test-reporter icon indicating copy to clipboard operation
test-reporter copied to clipboard

Error: HttpError: Resource not accessible by integration

Open pavelfomin opened this issue 2 years ago • 8 comments

Please update README to include proper permissions:

    permissions:
      checks: write

pavelfomin avatar Feb 09 '23 22:02 pavelfomin

I am facing the same issue, looks like the issue is still open. Did anyone find a workaround?

aquadirjha avatar Apr 03 '23 09:04 aquadirjha

Did anyone find a workaround?

@pavelfomin mentions the workaround in their original post, although it could use some more context:

If you don't pass the token argument to this action, it uses GITHUB_TOKEN by default. You can read about how permissions are assigned to GITHUB_TOKEN here. If your repository does not grant permissive defaults to GITHUB_TOKEN, then you need to add the checks: write permission so that the test reporter can write to the 'checks' API to publish the test report.

To do this, on a workflow or job that uses this action, add the following YAML at the workflow or job level:

permissions:
  checks: write

More info on that here. Hope this helps.

samkearney avatar Apr 19 '23 19:04 samkearney

This fixed it for me a few days ago

AlexZeitler avatar Apr 19 '23 21:04 AlexZeitler

This looks like a duplicate of #168.

JojOatXGME avatar Apr 25 '23 22:04 JojOatXGME

If anyone have Recommended setup for public repositories configuration, then in the test-report.yml set:

permissions:
  statuses: write
  checks: write
  contents: write
  pull-requests: write
  actions: write

DariuszPorowski avatar May 07 '23 06:05 DariuszPorowski

see also #309

djbrown avatar Apr 18 '24 22:04 djbrown

actually I think this issue was already resolved by #263

djbrown avatar Apr 18 '24 22:04 djbrown

@djbrown If I had to guess, I would say that a lot of people are probably running into this issue because they have missed that they have to set up two separate workflows as documented in the README.md. There were probably a lot of miscommunications or misunderstandings related to this issue. I am also a bit skeptical about the need of the other permissions which were added to the documentation over time. In my experience, checks: write is the only permission you have to specify, assuming you correctly split the CI into two workflows.

JojOatXGME avatar Apr 20 '24 15:04 JojOatXGME