You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Skip CI workflows for ADR-only PRs under docs/decisions ⚙️ Configuration changes🕐 Less than 5 minutes
Description
• Prevent CI workflows from running on PRs that only change ADRs in docs/decisions.
• Keep push-to-trunk CI behavior unchanged.
• Reduce wasted CI capacity and reviewer noise for documentation-only changes.
Diagram
graph TD
pr{{"Pull request"}} --> filt{"Ignore docs/decisions?"} --> lint["CI - Lint"] & rbe["CI - RBE"] & ci["CI"]
subgraph Legend
direction LR
_ext{{"External event"}} ~~~ _dec{"Decision"} ~~~ _wf["Workflow"]
end
Loading
High-Level Assessment
The following are alternative approaches to this PR:
1. Use allow-list paths (paths) instead of paths-ignore
➕ Tighter control: CI runs only when relevant code areas change
➕ Avoids edge cases where other docs should still run CI
➖ Higher maintenance: must keep allow-list updated as repo structure evolves
➖ Risk of accidentally skipping CI for important changes in new paths
2. Skip CI via PR label / command (job-level if condition)
➕ More flexible: can skip CI for other low-risk PR types on demand
➕ Does not rely on directory structure conventions
➖ Requires additional process and education for contributors
➖ More complex workflow logic and more opportunities for misconfiguration
Recommendation: Keep the current paths-ignore approach: it is the simplest, lowest-maintenance solution for the stated goal (skip ADR-only changes) and is easy to reason about. The allow-list approach can be considered later if CI skipping needs to become broader or more granular.
Files changed (3) +6 / -0
Other (3) +6 / -0
ci-lint.ymlSkip lint workflow on docs/decisions-only PR changes+2/-0
Skip lint workflow on docs/decisions-only PR changes
• Adds a pull_request paths-ignore rule for docs/decisions/** so ADR-only PRs do not trigger the lint workflow. Push-to-trunk triggering remains unchanged.
ci-rbe.ymlSkip RBE workflow on docs/decisions-only PR changes+2/-0
Skip RBE workflow on docs/decisions-only PR changes
• Adds a pull_request paths-ignore rule for docs/decisions/** so ADR-only PRs do not trigger the RBE workflow. Push-to-trunk triggering remains unchanged.
ci.ymlSkip main CI workflow on docs/decisions-only PR changes+2/-0
Skip main CI workflow on docs/decisions-only PR changes
• Adds a pull_request paths-ignore rule for docs/decisions/** so ADR-only PRs do not trigger the main CI workflow. Push-to-trunk triggering remains unchanged.
Adding paths-ignore: 'docs/decisions/**' under on.pull_request prevents these workflows from
triggering on ADR-only PRs, so the required status check contexts are never created. With the repo
ruleset requiring CI Success, Test / All RBE tests, Validate workflows, and `Format / Check
Format`, ADR-only PRs can become unmergeable due to missing required checks.
The repo has an active ruleset that requires CI check contexts which are produced by the workflows
being path-filtered; if the workflows don’t trigger on ADR-only PRs, those required contexts won’t
exist, blocking merges.
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution
### Issue description
The CI workflows are configured with `paths-ignore` for `docs/decisions/**` on `pull_request`, which prevents the workflows from running and therefore prevents required status check contexts from being created.
### Issue Context
The repo ruleset requires specific check contexts produced by these workflows (CI/RBE/Lint). If the workflow does not trigger, GitHub does not create those check runs/contexts, and merges can be blocked.
### Fix Focus Areas
- .github/workflows/ci.yml[3-9]
- .github/workflows/ci-rbe.yml[3-10]
- .github/workflows/ci-lint.yml[3-11]
- .github/rulesets/release-require-passing.json[14-37]
### Suggested fix approaches
Choose one (in priority order):
1) **Remove `paths-ignore`** and keep workflows triggered for all PRs (safest wrt required checks).
2) If you must skip heavy work for ADR-only PRs, **keep the workflows triggering** and implement an internal “docs-only” detection that makes the *required-check-producing jobs* exit successfully with minimal work (do not rely on workflow-level path filters). This may require refactoring reusable-workflow jobs so the required contexts still complete with `success`.
3) Alternatively, **change the required checks policy/ruleset** so those contexts are not required for ADR-only changes (only if the org’s governance supports it).
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
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
B-buildIncludes scripting, bazel and CI integrations
2 participants
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.
💥 What does this PR do?
We do not need to run CI for ADRs.
🤖 AI assistance