github3.py
github3.py copied to clipboard
content.update() not working for a branch
I get a 409 attempting to update a branch file. The logs show
2022-11-10 15:10:39,888 DEBUG [models] PUT https://github.xxx.com/api/v3/repos/owner/repo/contents/create_file.txt?ref=test-branch9 with {'data': '{"message": "test-branch9 2", "content": "dGVzdC1icmFuY2g5IDI=", "sha": "3f108ed16ed0e4775c6a574d4d06701495e6084b"}'}
2022-11-10 15:10:40,024 DEBUG [connectionpool] https://github.xxx.com:443 "PUT /api/v3/repos/owner/repo/contents/create_file.txt?ref=test-branch9 HTTP/1.1" 409 198
I ran the same PUT successfully as a curl command, removing '?ref=test-branch9' and adding it into the data portion as "branch": "test-branch9"
We're currently on v3.1.23, but scheduled to upgrade to 3.3 shortly. Will the API interface change to correctly work in 3.3?