Make hand-maintained smoke.yml jobs required status checks#388
Merged
Conversation
cloudofficer-admin
approved these changes
May 17, 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.
Summary
Branch protection is generator-managed:
collect_required_status_checksonly walks the generatedbuild.ymljobs, so jobs from a hand-maintained.github/workflows/smoke.ymlare never in the expected list. The result is that adding the smoke checks to branch protection by hand makes the nextgithub-buildrun fail on a checks mismatch (or, with--sync_required_status_checks, strips them again).This teaches the generator to discover those jobs, mirroring the existing non-workflow check detection (the
Vercelline right above the new code).Key changes:
lib/ghb/repository_configurator.rb: after the Vercel detection, if.github/workflows/smoke.ymlexists, parse it withPsychand append each job to@required_status_checksusing the jobname(falling back to the job id when a job has noname). Addedrequire 'psych'. Job names are read dynamically so renaming a smoke job needs no generator change.spec/ghb/repository_configurator_spec.rb: default-stubFile.exist?('.github/workflows/smoke.yml')tofalsein the sharedbefore(so existing examples are unaffected), plus a new context asserting the three discovered checks (two byname, one falling back to the job id) are appended afterBuild/Lint.After this merges, run
github-build ... --sync_required_status_checksagainst ci-actions once so the new contexts (Action contracts (all 28),Linter actions (disabled path),Variables action) are pushed intomasterbranch protection; thereafter every regeneration keeps them required.Types of changes
Checklist