Skip to content

Read exact refs in the release workflow's branch and tag checks - #9231

Merged
craigmichaelmartin merged 1 commit into
mainfrom
release-exact-refs
Dec 4, 2026
Merged

craigmichaelmartin merged 1 commit into
mainfrom
release-exact-refs

Conversation

@craigmichaelmartin

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

git ls-remote also lists refs whose names end in the one it's given. Two checks in the release workflow read its output as if it named only that ref: the Version Packages job's check that its push is the line's head, and the publish job's check for an existing tag.

WHAT is this pull request doing?

Both checks keep only the exact ref from git ls-remote's output (refs/heads/<line> and refs/tags/<version>).

How to manually test your changes?

Run the new commands against this repository:

git ls-remote https://github.com/Shopify/cli refs/heads/stable/5.2 | awk -v ref=refs/heads/stable/5.2 '$2 == ref {print $1}'
git ls-remote https://github.com/Shopify/cli refs/tags/5.2.1 | awk -v ref=refs/tags/5.2.1 '$2 == ref {found = 1} END {exit !found}' && echo "5.2.1 exists"
git ls-remote https://github.com/Shopify/cli refs/tags/5.2.9 | awk -v ref=refs/tags/5.2.9 '$2 == ref {found = 1} END {exit !found}' || echo "5.2.9 missing"

The first prints stable/5.2's head, and the others print "5.2.1 exists" and "5.2.9 missing".

🤖 Generated with Claude Code

git ls-remote also lists refs whose names end in the requested one. The Version Packages job's check
that its push is the line's head, and the publish job's check for an existing tag, now keep only the
exact ref from its output.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@craigmichaelmartin
craigmichaelmartin requested a review from a team as a code owner December 4, 2026 18:32
@github-actions github-actions Bot added the no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users. label Dec 4, 2026
@craigmichaelmartin
craigmichaelmartin added this pull request to the merge queue Dec 4, 2026
Merged via the queue into main with commit c424602 Dec 4, 2026
28 checks passed
@craigmichaelmartin
craigmichaelmartin deleted the release-exact-refs branch December 4, 2026 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants