Only uses modules included in AciveState basic install. Created as a function that can be imported or run.
Forked Gist from:
- fork using Hurl.it
- https://gist.github.com/eteq/1750715
- http://stackoverflow.com/a/11621536
See:
- http://stackoverflow.com/questions/9506181/github-api-create-branch
- https://developer.github.com/v3/git/refs/
Todo:
- Haven't tested OAuth yet
- get sha for master branch
- name new branches as timestamp
- add if name == "main": http://stackoverflow.com/questions/419163/what-does-if-name-main-do
Hiya!
I used this Gist as a base reference for a project I'm working on. I updated it to achieve 3 of your 4 todos. Here's the link: https://gist.github.com/ursulacj/36ade01fa6bd5011ea31f3f6b572834e