contributor-assistant / github-action

CLA Assistant GitHub Action
Apache License 2.0
281 stars 93 forks source link

"Error: Could not update the JSON file: Could not update file: Changes must be made through a pull request." #131

Open laurent22 opened 1 year ago

laurent22 commented 1 year ago

URL to the linked Repository or Organization

https://github.com/laurent22/joplin/pull/7755

Steps to reproduce the problem

There's not specific steps, but for some reason one of the signatures is not being processed:

https://github.com/laurent22/joplin/actions/runs/4155636396

Run contributor-assistant/github-action@v2.2.1
  with:
    path-to-signatures: readme/cla_signatures.json
    path-to-document: https://github.com/laurent22/joplin/blob/dev/readme/cla.md
    branch: dev
    allowlist: joplinbot,renovate[bot]
    use-dco-flag: false
    lock-pullrequest-aftermerge: true
  env:
    GITHUB_TOKEN: ***
    PERSONAL_ACCESS_TOKEN: ***
CLA Assistant GitHub Action bot has started the process
Error: Could not update the JSON file: Could not update file: Changes must be made through a pull request.

I don't quite understand what that means - the pull request has been signed here like all other pull requests, but for some reason this one in particular does not work. I've also retried the job without success.

Any idea what might be the issue?

laurent22 commented 1 year ago

In fact it seems it's now happening with all pull requests. This one too, which was signed but the action failed with same error, and signature file was not updated:

https://github.com/laurent22/joplin/pull/7757

himself65 commented 1 year ago

same error here

laurent22 commented 1 year ago

I don't know if that can help you @Himself65, but in our case it was because we changed the protection settings of the branch, and in particular it was required to change the branch via a pull request (and of course the bot doesn't create a pull request, so the changes to the .json file would fail).

himself65 commented 1 year ago

I don't know if that can help you @Himself65, but in our case it was because we changed the protection settings of the branch, and in particular it was required to change the branch via a pull request (and of course the bot doesn't create a pull request, so the changes to the .json file would fail).

That makes sense to me. I believe we have the same settings on branch protection.

himself65 commented 1 year ago

Thanks for helping me on this

ibakshay commented 1 year ago

Hi @Himself65, @laurent22, I have done a major refactoring and did a new release v2.3.0 and unfortunately introduced some bugs in it as well. I will work on it today and release a new version. Till then, please fallback to the previous stable version. I am really sorry for the inconvenience caused.

uses: contributor-assistant/github-action@v2.2.1

laurent22 commented 1 year ago

@ibakshay, no problem and thank you for getting back to us. I guess it's more a limitation of the bot than an actual bug. The main problem was that the error message wasn't very clear, which means it wasn't obvious what needed to be done.

ibakshay commented 1 year ago

@ibakshay, no problem and thank you for getting back to us. I guess it's more a limitation of the bot than an actual bug. The main problem was that the error message wasn't very clear, which means it wasn't obvious what needed to be done.

I have totally mixed things up. I thought you are facing issues after you have upgraded the version to v2.3.0. Thanks a lot for your pull request. I really appreciate it 🎉

ibakshay commented 1 year ago

Thanks for helping me on this

@Himself65 Did you also start facing issues after you have configured the branch protection? This PR https://github.com/contributor-assistant/github-action/pull/133 from @laurent22 will provide more info on the error message :)