Skip to content

Updating different files in the same repo at the same time return 409 conflict error #59

Open
@deepakdialpad

Description

@deepakdialpad

I am trying to use the githubpy library in my setup. My requirement is to update multiple different files in the repo. The request to update the files in git happens almost at the same time.
Sample code is like below. This is called with different file names from different places.

github_client = github.GitHub(access_token=access_token)
file_content = base64.b64encode(some_data).decode()
response = (github_client.repos(owner)(repo)('contents')(file_name)
                .put({'message': message,
                      'content': file_content,
                      'sha': file_sha,
                      'branch': branch}))

The first file update is successful but the subsequent file updated fail.
With this we always get the error. Error 409: Conflict

May i know is there a limitation on the githubpy library in doing this operation ?

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