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

Modify version_check.yml to not create new PRs on PRs from forks #511

Merged
merged 1 commit into from
Aug 23, 2024

Conversation

penelopeysm
Copy link
Member

@penelopeysm penelopeysm commented Aug 22, 2024

If a PR is made from a fork their_fork/docs with branch name their_branch, the create-pr action in version_check.yml attempts to open a PR against the their_branch branch in this repository, i.e. TuringLang/docs.

This causes the action to fail because their_branch doesn't exist as a branch in this repo. See e.g. #509 and in particular this run https://github.com/TuringLang/docs/actions/runs/10505358369/job/29136841113

This PR fixes this by detecting if the PR is being made from a fork. If so, don't attempt to open a PR.

@penelopeysm penelopeysm force-pushed the pysm/fix-version-check-forks branch from 5b866ca to 471dc44 Compare August 22, 2024 21:49
@penelopeysm penelopeysm force-pushed the pysm/fix-version-check-forks branch from 471dc44 to b74450b Compare August 22, 2024 21:51
Copy link
Contributor

Preview the changes: https://turinglang.org/docs/pr-previews/511
Please avoid using the search feature and navigation bar in PR previews!

@shravanngoswamii
Copy link
Member

shravanngoswamii commented Aug 23, 2024

Looks good, thank you, @penelopeysm, feel free to merge!

@penelopeysm penelopeysm merged commit 3812204 into master Aug 23, 2024
4 checks passed
@penelopeysm penelopeysm deleted the pysm/fix-version-check-forks branch August 23, 2024 09:05
github-actions bot added a commit that referenced this pull request Aug 23, 2024
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