Repository navigation
tree-tested: allow other repositories checked out at a pinned commit - #217
Merged
Merged
Conversation
A job that also checks out another repository, at a full commit sha its own tree names, never skipped: the rule wanted one actions/checkout step and one "HEAD is now at" line in the log. The new pinned-checkouts input names such repositories. The log is cut into steps, and each actions/checkout step's repository, ref and path are read from the inputs the runner prints under "with:". Exactly one checkout is of the job's own repository and shows the pull request merge, as before. Every other one must be of a named repository, at a ref that is a full commit sha, into a relative directory of its own, and at that commit. A "HEAD is now at" line outside a checkout step still runs the push in full. With the input empty, the rule is as strict as it was.
sprayberry-redline
approved these changes
Nov 13, 2026
sprayberry-redline
left a comment
Collaborator
There was a problem hiding this comment.
Verdict: approve. The action now passes the pinned checkout input through to the decision logic, and the log parser verifies named secondary checkouts are commit-pinned, isolated under the workspace, and match their recorded checkout commit. The added unit coverage exercises accepted pinned checkouts and the relevant rejection paths while preserving the existing merge validation.
This was referenced Nov 13, 2026
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.
A job that also checks out another repository, at a full commit sha that its own tree names (read from a file of the checkout), never skipped. The rule wanted exactly one
actions/checkoutstep and oneHEAD is now atline in the whole log, and such a job has two of each.The change
pinned-checkouts, lists those repositories (owner/name, separated by spaces, commas or new lines). It is the caller's word that each one is checked out at a sha the tree names. Empty, the default, keeps the rule as strict as before.checkoutMergecuts the log into steps and reads eachactions/checkoutstep'srepository,refandpathfrom the inputs the runner prints underwith:, with expressions already filled in. A checkout wrapped in a composite action prints its own inneractions/checkoutgroup, so it is read the same way.HEAD is now atline must be inside a checkout step, one to a step.refthat is a full commit sha;., not absolute, no..);HEAD is now atline at that commit.Checks
scripts/tree-tested/check.test.mjs: 79 passed. New cases cover:HEAD is now atlines in one checkout, or none;refunderenv:that must not be read as an input;HEAD is now atline before any step.