I need to create a branch dev
which is other than master
branch. Also need to update dev to default branch using GITHUB API.
Please share details if anyone know which API to call or a way to do it, programmatically. I understand with help of UI we can do it.
Thanks Ashish
I don't have enough reputation to reply to the Adam's comment above but the problem is name is a required field. The JSON should actually be:
PATCH /repos/:owner/:repo { "name":":repo" "default_branch": "dev" }
You can use requests library:
Docs:
Following the guide here: https://developer.github.com/v3/repos/#edit ,
default_branch
input should make what you wantSo, you should submit a
PATCH
request like: