Skip to content

content.update() not working for a branch #1117

@mscherfling

Description

@mscherfling

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions