ffittschen / pr-branch-labeler

🏷 Automatically label your PRs based on their branches.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Resource not accesible by integration

mmeendez8 opened this issue · comments

I have been using this action for a while but suddenly the workflow is crashing when opening a new PR. The error is the following:

Run ffittschen/pr-branch-labeler@v1
Error: Resource not accessible by integration
(node:1[4](https://github.com/****/runs/8230424748?check_suite_focus=true#step:2:5)97) UnhandledPromiseRejectionWarning: HttpError: Resource not accessible by integration
    at /home/runner/work/_actions/ffittschen/pr-branch-labeler/v1/node_modules/@octokit/request/dist-node/index.js:66:23
    at processTicksAndRejections (internal/process/task_queues.js:97:[5](https://github.com/****/runs/8230424748?check_suite_focus=true#step:2:6))
(node:149[7](https://github.com/****/runs/8230424748?check_suite_focus=true#step:2:8)) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:1497) [DEP001[8](https://github.com/****/runs/8230424748?check_suite_focus=true#step:2:9)] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

It seems to disappear if I just sent a new commit to the opened PR. Any idea?

It seems someone had given write permission to the pr labeller workflow and that was causing this error. I just removed the following from the yaml file:

    permissions:
      pull-requests: write