ci: run ci and codeql checks on pull requests to any base branch - #4075
Open
aheritier wants to merge 1 commit into
Open
ci: run ci and codeql checks on pull requests to any base branch#4075aheritier wants to merge 1 commit into
aheritier wants to merge 1 commit into
Conversation
The pull_request branches: [ main ] filter matches the PR's base branch, not its head. Stacked PRs (base is a feature branch, not main) never trigger ci or codeql at all, so lint, build-and-test and license-check -- the three checks the repo ruleset requires to merge into main -- never run or report on them. Drop the branches: filter from the pull_request trigger in both workflows; push triggers are untouched.
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.
🤖 Automated implementer agent — this comment was posted by the implementer bot from Docker Agentic Platform, not by a human developer
What
Removes the
branches: [ main ]filter from thepull_requesttrigger inci.ymlandcodeql.yml. Two deleted lines, nothing else —pushtriggersare untouched in both files, and no job, step,
if:guard, permission orconcurrency setting is modified.
Why
branches:on apull_requesttrigger matches the PR's base branch, notits head. A stacked PR's base is a parent feature branch, not
main, sociand
codeqlnever fire on it. All three checks the repo ruleset requires tomerge into
main—lint,build-and-test,license-check— live inci.yml, so a stacked PR today gets no build, test, lint, licence or securitysignal at all.
Evidence: PR #4074 (base
fix/startable-toolset-backoff) has nociorcodeqlrun in any state, while its sibling #4062 (basemain, same author,same day) has the full set. The only workflows that ran on #4074 are the ones
with no
branches:filter (docs-lint,docs-a11y,docs-upstream). Thereare 14 stacked PRs open right now (#4016–#4030), so this is a live, ongoing
gap, not a hypothetical.
Flagging for review
lint,build-and-test,windows-tests,license-check,build-imageon tworunners, and three CodeQL analyses. On a 14-deep stack, each restack
re-runs the whole chain — a real increase in CI minutes. If this proves too
costly, the right lever is gating the expensive
build-imagejob, notre-introducing a base-branch filter (that would bring back the exact gap
this PR closes).
PRs; it does not make them blocking there. All three rulesets are
scoped to
~DEFAULT_BRANCH, so a red stacked PR can still be merged intoits parent branch — reviewers will just be able to see that it's red now.
Extending enforcement to feature branches is a separate repo-settings
decision, deliberately left out of this PR.
Publishing is unaffected
build-and-push-image,merge-and-push-imageandmerge-and-push-templateare each guarded by
if: github.event_name != 'pull_request' && !github.event.repository.fork,and the
pushtrigger stays scoped tomainandv*tags. Broadening thepull_requesttrigger cannot cause a stacked PR to push an image or manifest.Testing
actionlint v1.7.12(the same linter CI runs viaraven-actions/actionlint)exits 0 with no findings on both patched files.
task build/task testare not applicable — no Go code is touched.