Open chickenandpork opened 1 year ago
The reason for this is issue #214 , the automation does not have enough rights to your repository. This can be fixed with:
...
steps:
- id: automerge
name: automerge
uses: "pascalgn/automerge-action@v0.15.6"
permissions:
contents: write
...
I've updated the README and closed #214, so I think this one can also be closed.
Thanks @pascalgn ; I hope it fixes it. I forget now where I was trying this.
Did you see where I asked:
It would be awesome if the inaccessible Resource was named
Is that just assumed to be the repository, or if the error's on write, maybe it was worth logging what was refused? It's kinda frustrating to see "something was refused" with no real way to find out what :(
Oh, wait, my failure already had permissions: check my copy of config above:
...
# Note: Advice from https://github.com/pascalgn/automerge-action/issues/214
contents: write
...
So this workaround from #214 was already in place? Or was it incorrectly in place ? Otherwise, the thing that's there in the problem example can't fix the problem.
I think it's not clear from the logging, but the error message comes directly from GitHub. If you search for "Resource not accessible by integration"
you find lots of other people who are having various problems when calling the GitHub API. I agree that the error message is not helpful.
I'm getting the same problem... using the above fairly vanilla workflow. Did anyone get this to work?
I'm on the free account so trying to use this to auto-merge after tests have been run, as that appears to be a feature reserved for paying customers ;). Don't know if that's material or not.
random note: while I haven't gotten the above to work, I did get the following to work using my own personal GH token, not the default one. So perhaps a permission problem. permissions: contents: write env: BRANCH_NAME: ${{ github.head_ref || github.ref_name }} GH_TOKEN: ${{ secrets.MY_GH_TOKEN }} step: ...
YMMV. Thanks!
With slight changes from the example config, my PRs are seeing this failure message at subject:
ERROR Resource not accessible by integration
Config
Detected Labels
Failing Log
It would be awesome if the inaccessible
Resource
was named or identified I think; can you suggest what else I can try?