Describe the bug
Forked pull requests in sailpoint-oss/developer.sailpoint.com fail in the prettier and Slinky - Crawl Docs for broken links workflows because the workflows explicitly check out github.head_ref. On forked PRs, this causes actions/checkout to try fetching the contributor branch from the upstream repository instead of from the fork.
To Reproduce
- Fork
sailpoint-oss/developer.sailpoint.com
- Create a branch in the fork and open a pull request back to
sailpoint-oss/developer.sailpoint.com
- Wait for the
prettier (pull_request) and Slinky - Crawl Docs for broken links / slinky (pull_request) checks to run
- See the checkout step fail
Expected behavior
Forked pull requests should use the default pull request checkout behavior and the checks should run against the PR normally.
Actual behavior
The checkout step fails while trying to fetch the contributor branch from the upstream repository. Example error from PR checks:
/usr/bin/git -c protocol.version=2 fetch ... origin +refs/heads/sailpoint-1023-rule-name-docs* ...
The process '/usr/bin/git' failed with exit code 1
Screenshots
Not applicable. The failure is visible in the GitHub Actions logs for forked PRs such as PRs #1093 and #1094.
Operating System (please complete the following information):
- OS: GitHub Actions Ubuntu runner
- CLI Environment: GitHub Actions
- Version:
ubuntu-latest
Browser (please complete the following information):
- Browser: GitHub web UI
- Version: current
Additional context
A proposed fix is already open in PR #1095, which removes the explicit github.head_ref checkout override from the affected workflows.
Describe the bug
Forked pull requests in
sailpoint-oss/developer.sailpoint.comfail in theprettierandSlinky - Crawl Docs for broken linksworkflows because the workflows explicitly check outgithub.head_ref. On forked PRs, this causesactions/checkoutto try fetching the contributor branch from the upstream repository instead of from the fork.To Reproduce
sailpoint-oss/developer.sailpoint.comsailpoint-oss/developer.sailpoint.comprettier (pull_request)andSlinky - Crawl Docs for broken links / slinky (pull_request)checks to runExpected behavior
Forked pull requests should use the default pull request checkout behavior and the checks should run against the PR normally.
Actual behavior
The checkout step fails while trying to fetch the contributor branch from the upstream repository. Example error from PR checks:
/usr/bin/git -c protocol.version=2 fetch ... origin +refs/heads/sailpoint-1023-rule-name-docs* ...The process '/usr/bin/git' failed with exit code 1Screenshots
Not applicable. The failure is visible in the GitHub Actions logs for forked PRs such as PRs #1093 and #1094.
Operating System (please complete the following information):
ubuntu-latestBrowser (please complete the following information):
Additional context
A proposed fix is already open in PR #1095, which removes the explicit
github.head_refcheckout override from the affected workflows.