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

ci/stitchmd: Support updating PRs from forks #181

Merged
merged 1 commit into from
May 9, 2023
Merged

Conversation

abhinav
Copy link
Collaborator

@abhinav abhinav commented May 9, 2023

The operation failed in #174 because the PR was made from a fork. Looking at the documentation for git-auto-commit-acton, it's possible to support this for forks as well if we use the pull_request_target event (which runs in the context of the base branch), and check out the PR repository (which may be a fork). See also https://github.com/stefanzweifel/git-auto-commit-action#use-in-forks-from-public-repositories.

The operation failed in #174 because the PR was made from a fork.
Looking at the [documentation for git-auto-commit-acton](https://github.com/stefanzweifel/git-auto-commit-action), it's possible to support this for forks as well if we use the `pull_request_target` event (which runs in the context of the base branch), and check out the PR repository (which may be a fork).
See also https://github.com/stefanzweifel/git-auto-commit-action#workflow-should-run-in-base-repository for details.
@mway mway merged commit d3ca5c2 into master May 9, 2023
@mway mway deleted the ci-stitchmd-fork branch May 9, 2023 17:58
abhinav added a commit that referenced this pull request May 9, 2023
#181 tried to fix support for PRs from forks
by changing the event to pull_request_target.
However, it did not update the check we do on github.event_name later
to decide whether we're in check mode or write.

This updates the job to fix the event name match.
abhinav added a commit that referenced this pull request May 9, 2023
#181 tried to fix support for PRs from forks
by changing the event to pull_request_target.
However, it did not update the check we do on github.event_name later
to decide whether we're in check mode or write.

This updates the job to fix the event name match.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants