Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get 403 RequestError when others create pull request #6

Open
yinxin630 opened this issue Sep 13, 2020 · 3 comments
Open

Get 403 RequestError when others create pull request #6

yinxin630 opened this issue Sep 13, 2020 · 3 comments

Comments

@yinxin630
Copy link

This problem occurred when someone else created a pull request, but there was no problem when I created it myself

Run romeovs/[email protected]
RequestError [HttpError]: Resource not accessible by integration
    at /home/runner/work/_actions/romeovs/lcov-reporter-action/v0.2.16/dist/main.js:6018:23
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async main$1 (/home/runner/work/_actions/romeovs/lcov-reporter-action/v0.2.16/dist/main.js:22911:2) {
  name: 'HttpError',
  status: 403,
  request: {
    method: 'POST',
    url: 'https://api.github.com/repos/yinxin630/fiora/issues/229/comments',
    headers: {
      accept: 'application/vnd.github.v3+json',
      'user-agent': 'octokit.js/16.35.0 Node.js/12.13.1 (Linux 5.4; x64)',
      authorization: 'token [REDACTED]',
      'content-type': 'application/json; charset=utf-8'
    },
    body: `...`
  }
@merlinstardust
Copy link

merlinstardust commented Jun 27, 2023

@merlinstardust
Copy link

Found a fix by adding permissions: write-all to the specific job`

@jameslan
Copy link

jameslan commented Aug 25, 2024

Found a fix by adding permissions: write-all to the specific job`

When you create a PR in your own repo, the job permission only needs pull-requests to add comments:

permissions:
  pull-requests: write

If the PR is created by someone else, 403 error is returned with message

Resource not accessible by integration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants