CI: Don't leave required checks pending on documentation-only PRs - #9194
Conversation
The required checks (Linux, macOS, Windows, Linux (without optional dependencies), Code Validator) are filtered with paths: on the workflow trigger, so a PR touching only documentation never starts those workflows and GitHub never receives a status for those check names. Branch protection then keeps them at "Expected - Waiting for status to be reported" and the PR cannot be merged. Move the path filtering out of the trigger into a small changes job and gate the real job with if: instead. A job skipped by a conditional does report a status and satisfies branch protection, whereas a workflow that never runs does not. The changes job checks out the repository because paths-filter only uses the API for pull_request events; for push it needs git. Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
|
Make similar changes in docker.yml and docs.yml? |
Ok, I will do it tomorrow. |
…s.yml Same reasoning as the previous commit, extended to the two remaining path-filtered workflows per seisman's review comment on #9194. docs.yml has no pull_request trigger, so the docs job's condition covers push (gated by the filter), release and workflow_dispatch (always run). Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
docker.yml is the only one of these workflows with its own permissions block, and declaring one sets every unlisted scope to none. paths-filter needs pull-requests: read to list the files of a pull request, so without it the changes job would have failed on every PR and taken the docker job down with it. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
docs.yml has no pull_request trigger, so it never posts a status on a PR and can't be the cause of the pending-required-checks problem this PR fixes - the change bought nothing there. Worse, it added a new failure mode on the release event: if the changes job errors out, the docs job is skipped rather than failed, silently dropping the doc build, the gh-pages deploy and the release package. Keeping docker.yml, which does run on pull_request and was the one seisman asked about. Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
|
Added the same pattern to Left @seisman do you still want the same change in |
Documentation-only PRs leave the required checks (
Linux,macOS,Windows,Linux (without optional dependencies),Code Validator) stuck at "Expected — Waiting for status to be reported", which blocks the merge: withpaths:on the trigger the workflow never runs, so no status is ever reported for those names. The filtering now happens in a smallchangesjob and the real job is skipped viaif:instead, which does report a status and satisfies branch protection.Assisted-by: Claude Sonnet 5 (implementation) and Claude Opus 5 (review)