Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

github.rest.issues.createComment results in "Resource not accessible by integration" error#490

Answeredbyjoshmgross
jprider63 asked this question inQ&A
Discussion options

I'mattempting to usegithub-script topost a comment to a PR during CI. Unfortunately it isfailing with the error"Error: Unhandled error: HttpError: Resource not accessible by integration" when run on a PR to the main repository. When the same commit (72c2497) is run on my fork of the repository,CI passes and posts the comment without error. So far, I've tried adding the following permission settings, but none of them work for PR's against the main repository:

permissions:  pull-requests: write
permissions:  pull-requests: write  issues: write
permissions: write-all
permissions:  id-token: write  contents: read  issues: write  pull-requests: write

We've also checked that "Allow all actions and reusable workflows" and "Read and write permissions" is set for the main repository's action permission settings.

Is there another permission that we need to set? Any suggestions would be appreciated! Thanks!

You must be logged in to vote

Pull Requests workflows from forks can't utilize write permissions, which is why you're getting a failure. You can see the effective permissions for a job in the "Set up job" step logs.

pull_request_target is likely the event you want, but please read through the full documentation to understand the security risks. If you have any questions about that, feel free to ask!

Replies: 2 comments

Comment options

Use ofinformation passed between jobs

An example of problem solvingtravellings-link/travellings@6fc4418 (Ignore the job named “comment” and focus on "comment-auto-check-assistant-result" and "auto-check-assistant".)

You must be logged in to vote
0 replies
Comment options

Pull Requests workflows from forks can't utilize write permissions, which is why you're getting a failure. You can see the effective permissions for a job in the "Set up job" step logs.

pull_request_target is likely the event you want, but please read through the full documentation to understand the security risks. If you have any questions about that, feel free to ask!

You must be logged in to vote
0 replies
Answer selected byjoshmgross
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
3 participants
@jprider63@joshmgross@HowieHz

[8]ページ先頭

©2009-2025 Movatter.jp