TuringLang / docs

Documentation and tutorials for the Turing language
https://turinglang.org/docs/
MIT License
231 stars 99 forks source link

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

Closed penelopeysm closed 2 months ago

penelopeysm commented 2 months ago

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.

github-actions[bot] commented 2 months ago

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

shravanngoswamii commented 2 months ago

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