Using version 1.0.0a4 of the github3.py library.
I am trying to create a new file in the repository on a new branch.
Assumption: gh is an authenticated object.
repo = gh.repository('User','Repo')
repo.create_file(path='NewFile',message='Commit Message',content='File Content', branch='NewBranch')
The call to create_file fails to create the 'NewFile' and the 'NewBranch'. If I do the following the file is created ok on the "Default" branch as I would expect.
repo.create_file(path='NewFile',message='Commit Message',content='File Content')
I was sure that the first form of the 'create_file' did in fact create the branch once, but I'm unsure why it isn't happening now. Is it not a fair expectation that the 'branch' would be created by this call? I haven't found another API that would create a branch.