Expose the oid of the commit, so a caller can name what it just committed - #3
Merged
Conversation
…tted commit-branch.sh already parsed the oid out of the GraphQL response and threw it away after logging its first twelve characters. It now reaches the caller as a step output, and action.yml declares it. A caller that has to act on the commit could previously only ask GitHub to resolve the branch again by name, and GitHub can still resolve a branch to its previous tip for seconds after the mutation lands. pkghaus/packages dispatched a release that way on 2026-09-13, the run checked out the parent of the commit it was meant to release, and the archive stayed a version behind for twelve hours. The output is empty when nothing was committed, which is distinct from a failure: a failure exits non-zero and emits nothing, because the assignment that captures the oid takes the parser's exit status. lint-action.sh now also asserts every declared output reads from the step's id. Without that an output wired to nothing resolves to the empty string forever, which is indistinguishable from a commit that changed nothing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
commit-branch.shalready parsed the oid out of the GraphQL response and threwit away after logging its first twelve characters. It now reaches the caller as
a step output, and
action.ymldeclares it.Why
A caller that has to act on the commit could previously only ask GitHub to
resolve the branch again by name, and GitHub can still resolve a branch to its
previous tip for seconds after the mutation lands.
pkghaus/packagesdispatched a release that way on 2026-09-13. The run checkedout the parent of the commit it was meant to release, read the pre-bump
changelog, derived a tag that already existed, planned nothing and went green.
The archive served the previous version of
ouchfor twelve hours.Behaviour
shais the full oid, not the truncated form the log prints.exits non-zero and emits nothing, because the assignment that captures the oid
takes the parser's exit status.
GITHUB_OUTPUTis a no-op, so local runs and the test suite areunaffected.
Blast radius
Additive.
pkghaus/aptandpkghaus/brandconsume this action and neitherreads the new output, so both are unaffected by the change itself.
Moving the
v1tag onto this commit is what arms it, andpkghaus/packagesdepends on that tag having moved. Merge and retag here BEFORE merging the
matching change in
pkghaus/packages, or that repo's bump will refuse todispatch a release.
Tests
tests/run.shgoes from 8 assertions to 13.tests/lint-action.shgains anassertion that every declared output reads from the step's id, since an output
wired to nothing resolves to the empty string forever and looks exactly like a
commit that changed nothing.
Mutation-checked: emitting the truncated oid, dropping the empty-sha report on
an unchanged tree, and dropping the signature check are each caught by the
suite.