ci: add universal PR Gate required status check - #90
Merged
Merged
Conversation
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
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.
Problem
The PR Validation workflow had a workflow-level
paths-ignorefor docs and config files. On a docs-only PR the entire workflow (Unit Tests + Lint) never ran, so those checks never reported. Requiring them in branch protection would permanently block any docs-only PR, since a required check that never reports can't be satisfied.Change
Restructure so the workflow triggers on every PR to
mainand add a single aggregate gate:paths-ignore. The workflow now runs on all PRs tomain.changesjob using SHA-pinneddorny/paths-filterto detect whether non-docs (code) files changed.Unit TestsandLintjobs onneeds.changes.outputs.code == 'true', so they skip on docs-only PRs but keep their existing behavior otherwise.PR Gatejob (needs: [unit-tests, lint],if: always()) that passes when each gated job succeeds or is skipped, and fails when any failed or was cancelled.Resolution
PR Gatereports green.PR Gatereports green.PR Gatereports red.Branch protection
Require the single check named
PR Gate. It reports on every PR, so docs-only PRs are no longer locked out, while real failures still block.