check: read a workflow that carries triggers beside workflow_call - #932
Merged
Conversation
A workflow declaring `workflow_call` alongside `pull_request`, `push`, or `schedule` starts on its own triggers, so calling it unreachable dropped the whole `credential-environments` sweep to SKIP on a repo it could otherwise verify. Reachability now anchors on a workflow with triggers of its own and follows the call graph out from there, which also catches a callee whose only route in is another workflow nothing here starts. A repo may call its own reusable workflow by the `owner/repo/.github/workflows/x.yaml@ref` form to pin the ref it runs; that reaches the same file as the relative form, so the callee inherits the caller's triggers either way. install-tend's environment section named ref pinning as the only gate, while the check takes required reviewers too. Pinning an environment whose deploy runs from `refs/pull/N/merge` breaks it, so the section now carries both routes and when each fits.
tend-agent
approved these changes
Aug 9, 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.
Two defects found while running tend against a repo whose
tests.yamldeclaresworkflow_callalongsidepull_request,push,schedule, andworkflow_dispatch.The check called that workflow unreachable.
_effective_triggerstreated any workflow declaringworkflow_callwith no in-repo caller as reachable only from outside, so the wholecredential-environmentssweep degraded toSKIPand verified nothing on a repo that was otherwise fine. Reachability now anchors on a workflow carrying triggers of its own and follows the call graph out from there, which also catches the case the old rule let through: a callee whose only route in is another workflow nothing here starts. That direction only adds unknowns.uses:detection missed the absolute self-referencing form. A repo may call its own reusable workflow asowner/repo/.github/workflows/x.yaml@refto pin the ref it runs. Under the old rule that looked uncalled and failed safe to "unknown"; under the new one it would have been a false pass, so both spellings now resolve to the same file.Neither change can turn a
FAILinto aPASS: resolved trigger sets only grow, andungatedis decided beforeunresolvedis consulted.install-tend §3 taught only half the gate. The section told adopters to pin every credential-holding environment to admin-gated refs, while the check accepts either a ref policy or required reviewers who exclude the bot. Following it literally breaks a
github-pagesenvironment whose deploy runs fromrefs/pull/N/merge— no branch or tag policy can name that ref, and such an environment is typically already reviewer-gated. The section is now "Environment gates" and carries both routes, when each fits, and a recipe for the reviewer one.Verification against the live API
Before, on a repo with that workflow shape:
After:
tend checkon this repo reportsPASS credential-environmentsend to end. Three tests added; each fails on the pre-fix code.