Skip to content

[Bug] Forked pull requests fail prettier and slinky workflows during checkout #1098

Description

@moeboua-cloud

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

  1. Fork sailpoint-oss/developer.sailpoint.com
  2. Create a branch in the fork and open a pull request back to sailpoint-oss/developer.sailpoint.com
  3. Wait for the prettier (pull_request) and Slinky - Crawl Docs for broken links / slinky (pull_request) checks to run
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions