question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] HttpError: Resource not accessible by integration - but it's working at a 2nd call

See original GitHub issue

I was using the labeler quite a while now, so I can have nice labels for my mono-repo. But since a few weeks I get always(~99%) the same errors (see below), when Dependabot is creating PRs with dependency updates.

If I rerun the check, everything works as expected. Anyone else having this issue?

triage
HttpError: Resource not accessible by integration
triage
Resource not accessible by integration

My .github/workflows/labeler.yml looks like this:

name: "Pull Request Labeler"
on:
  pull_request:
    branches: [ main ]

jobs:
  triage:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/labeler@main
        with:
          repo-token: "${{ secrets.GITHUB_TOKEN }}"
          sync-labels: true

my .github/labeler.yml looks like this:

project1-frontend:
  - services/project1-frontend/**/*

project1-backend:
  - services/project1-backend/**/*
  
project2-frontend:
  - services/project2-frontend/**/*

project2-backend:
  - services/project2-backend/**/*

image

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:8
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
dannysauercommented, Jun 21, 2021

I’ve also been seeing this a lot recently, only with this action (always from Dependabot, too).

It’d be nice if this would log something a bit more helpful in debugging what exactly it is that is not accessible. 😃

1reaction
jsorefcommented, Jun 29, 2022

So, I’d argue that this action should recognize when it’s in this state and explain itself.

Basically an action can know which event it’s running under (here: pull_request), and it can know which permissions it has/doesn’t have (here: it doesn’t have pull-requests: write), and it could spit out:

:warning: actions/labeler is running under `on: pull_request` without `permissions: pull-requests: write` and thus can't perform its work. To fix this, someone with write access to the repository will have to update the workflow to apply these changes. Refer to https://github.com/actions/labeler/blob/6a315d4ea58951035b498eef56668feaba24489f/README.md#create-workflow for more information on the recommended content for the workflow which should be helpful in fixing this workflow.

(Whether it hardcodes 6a315d4ea58951035b498eef56668feaba24489f, or uses git rev-parse HEAD / an equivalent environment variable is an implementation detail.)

Read more comments on GitHub >

github_iconTop Results From Across the Web

HttpError: Resource not accessible by integration when using ...
Researching the GitHub documentation I saw that there was a special permission key named issues , when I added it to the permissions:...
Read more >
Resource not accessible by integration - GoReleaser
While it is a good practice, and should work for most cases, if your workflow writes a file in another repository, you may...
Read more >
Automate your process with GitHub - Sylhare's blog
The GitHub rest API allows you to interact gain access to its ... Unhandled error: HttpError: Resource not accessible by integration.
Read more >
Debug "Resource not accessible by integration" error when ...
This error basically talks about a permission issue. When working with Github apps, you may not have set the necessary permission to access...
Read more >
Token permissions for GitHub Actions - Damir's Corner
Recently, the Test Reporter action in one of my workflows failed with the following error message: Resource not accessible by integration.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found