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

Use pull_request_target in workflow as PRs are from forks #1645

Merged
merged 1 commit into from
Feb 13, 2025

Conversation

btat
Copy link
Contributor

@btat btat commented Feb 13, 2025

Description

After adding the workflow in #1643, the first run of the action failed due to GraphQL: Resource not accessible by integration (createIssue).

The GitHub docs indicate the Maximum access for pull requests from public forked repositories is only read, whereas the workflow needs write access to create an issue.

Switching to pull_request_target to see if it fixes things as per the docs:

When a workflow is triggered by the pull_request_target event, the GITHUB_TOKEN is granted read/write repository permission, even when it is triggered from a public fork.

@btat btat merged commit bfaab32 into rancher:main Feb 13, 2025
1 check passed
@btat btat deleted the workflow-fix branch February 13, 2025 23:08
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

Successfully merging this pull request may close these issues.

2 participants