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

Fixes for PRs from public forks #12

Merged
merged 5 commits into from
Nov 1, 2023
Merged

Fixes for PRs from public forks #12

merged 5 commits into from
Nov 1, 2023

Conversation

Frederick888
Copy link
Owner

@Frederick888 Frederick888 commented Nov 1, 2023

Changes

17b4944 fix: Use gh pr checkout instead of relying on actions/checkout

This allows running gh-ph using pull_request_target as the triggering
event, which unlike the pull_request event, gives the GITHUB_TOKEN
writer permissions so that gh-ph can update the PR.

But when using pull_request_target, actions/checkout does not initialise
the PR head. Here we simply use gh CLI instead.

f81c1f2 docs: Suggest using pull_request_target

This should allow gh-ph to run on PRs from public forks.

Checklist

  • I have rebased my branch so that it has no conflicts
  • Commit messages are compliant with Conventional Commits

Is this a breaking change?

No

This allows running gh-ph using pull_request_target as the triggering
event, which unlike the pull_request event, gives the GITHUB_TOKEN
writer permissions so that gh-ph can update the PR.

But when using pull_request_target, actions/checkout does not initialise
the PR head. Here we simply use gh CLI instead.
This should allow gh-ph to run on PRs from public forks.
@Frederick888 Frederick888 merged commit 61ab537 into master Nov 1, 2023
@Frederick888 Frederick888 deleted the fix-pub-fork branch November 1, 2023 06:45
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.

1 participant