Closed JoshuaJackson-jobvite closed 1 month ago
Odd bit is that the main bits of code: https://github.com/diggerhq/digger/blob/9b155e3f5f6faa024abc68cdd69140504826e074/libs/ci/github/github.go#L304-L308 haven't changed in 2 months. So its not anything that should be new...
I added issue: write
to the permissions:
section and it continued to fail while also saying that all checks had passed.
Hi @samroweemployinc try issues: write
(plural) and let me know if it resolves it for you
I suspect its related to this change
if confirmed to fix I will be updating the docs
Sorry the typo was in my comment, not in my test. I'd written issues: write
in the actual file.
Ensure it looks like this:
permissions:
contents: write # required to merge PRs
actions: write # required for plan persistence
id-token: write # required for workload-identity-federation
pull-requests: write # required to post PR comments
issues: write
statuses: write # required to validate combined PR status
also ensure it exists in the main branch
I'll try to test soon.
Still seeing error getting pull request (as issue):
error checking if pull request is issue:
with permissions like so:
permissions:
actions: write # required for plan persistence
contents: write # required to merge PRs
id-token: write # required for workload-identity-federation
issues: write
pull-requests: write # required to post PR comments
statuses: write # required to validate combined PR status
Still seeing
error getting pull request (as issue):
error checking if pull request is issue:
with permissions like so:permissions: actions: write # required for plan persistence contents: write # required to merge PRs id-token: write # required for workload-identity-federation issues: write pull-requests: write # required to post PR comments statuses: write # required to validate combined PR status
Please note we did modifications to the job and global level, and as job and global were the same stripped it down to just global for the permissions configuration.
I can also confirm for the github app, that we have read/write access to issues, and pull requests on the repo level.
Thanks for continued investigation on this. I had someone report exact same error and it was fixed with issues: write. Not sure what may be going on in your case but if at all possible could we reproduce it in a minimal repo somehow? That would be immensely helpful!
Can confirm moving the permissions from the job level to the global level has resolved this issue for me.
Great! Glad it helped
Today I hit the same problem. Starting from digger v0.6.41, issues permissions are appear to be required. Whether issues: write
permission is required or not may depending on which functionality you use, but at least the minimum issues: read
permissions worked for me.
Upgrading from 0.6.40 to 0.6.42 resulted in the following error: error getting pull request (as issue): GET https://api.github.com/repos/ORG/REPO/issues/1316: 403 Resource not accessible by integration []
On 0.6.40 exact same workflow executes without any errors to the api nor were permissions needed to be extended. In testing with added permissions for issue and pullrequest no change in error. I have not adjusted the workflows permissions yet to test that change.
digger.yml:
Github action: