Skip to content

fix: fall back to master workflows ref for merge-queue refs#18

Merged
Aniruddha-Shriwant merged 1 commit into
masterfrom
fix-merge-queue-workflows-ref
Jul 6, 2026
Merged

fix: fall back to master workflows ref for merge-queue refs#18
Aniruddha-Shriwant merged 1 commit into
masterfrom
fix-merge-queue-workflows-ref

Conversation

@Aniruddha-Shriwant

Copy link
Copy Markdown
Contributor

Problem

fyle-app merge-queue runs of the Validate pnpm config reusable workflow fail at the Checkout workflows repository for validator script step:

/usr/bin/git fetch ... +refs/heads/gh-readonly-queue/master/pr-15300-a1b57abc...*
The process '/usr/bin/git' failed with exit code 1

The "Resolve workflows repository ref" step derives the checkout ref from github.workflow_ref, which is the caller's ref. On merge_group events that is refs/heads/gh-readonly-queue/master/pr-<n>-<sha> — a branch that only exists in the caller repo (fyle-app), not in fylein/workflows. The checkout fetch fails, the job fails, and the PR is dequeued from the merge queue.

The existing fallback (#16) only covered refs/pull/* (pull_request events).

Fix

Treat merge-queue refs (refs/heads/gh-readonly-queue/*) like refs/pull/*: fall back to master when checking out this repo for the validator script.

Note: this only changes which ref of this repo the validator script is fetched from. The validation itself still runs fully, against the merge-queue commit of the caller repo — nothing is skipped.

github.workflow_ref on merge_group events resolves to the caller's
refs/heads/gh-readonly-queue/* ref, which does not exist in the
workflows repository. The validator-script checkout then fails with
git exit code 1 and dequeues the PR from the merge queue.

Treat merge-queue refs like refs/pull/* and fall back to master.
@Aniruddha-Shriwant Aniruddha-Shriwant requested a review from rvab July 6, 2026 10:27
@Aniruddha-Shriwant Aniruddha-Shriwant merged commit 748bbdc into master Jul 6, 2026
9 checks passed
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