5monkeys / cobertura-action

GitHub Action to report cobertura coverage
MIT License
63 stars 68 forks source link

Error: Resource not accessible by integratio #80

Open kkmann opened 1 year ago

kkmann commented 1 year ago

Hey,

cool action - still amazed by how complex it is to get coverage reporting into PRs withour external services...

Since a few days my pipelines fail with

Error: Resource not accessible by integratio

see example: https://github.com/Boehringer-Ingelheim/oncomsm/actions/runs/4151027484/jobs/7201882375

Any ideas?

itsalysialynn commented 1 year ago

@kkmann I managed to fix this by giving the job write-all permissions:

jobs:
  quality-check:
    name: Quality Check
    permissions: write-all
asteel-gsa commented 1 year ago

@kkmann I managed to fix this by giving the job write-all permissions:

jobs:
  quality-check:
    name: Quality Check
    permissions: write-all

This is also what worked for me, but, I would really like to see scoped permissions possible.

jobs:
  job-name:
    permissions:
      pull-requests: write
itzJustKranker commented 7 months ago

you certainly don't need permissions: write-all. Although that would be the easiest fix. I believe I had to add checks and issues scopes for it to succeed. All in all my permissions look like this.

permissions:
  actions: read
  contents: read
  packages: read
  pull-requests: write
  checks: write
  issues: write

but it would be great if the README, called out specifically what permissions the job required so we didn't have to guess

caarmen commented 4 months ago

I needed to add pull-requests:write, but issues: write was not required.