Skip to content

fix(pr): judge the branch and path filters of pull request workflows - #6803

Merged
dan-petty merged 5 commits into
mainfrom
fix/5408-pr-ready-no-workflow
Nov 22, 2026
Merged

dan-petty merged 5 commits into
mainfrom
fix/5408-pr-ready-no-workflow

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

devops pr ready and devops pr check-readiness read the branch and
path filters of each pull_request and pull_request_target workflow.
When the head commit has no checks and these filters skip the pull
request in each workflow, pr ready marks it ready with no --force.
Before, a pull request that changed only files that paths skips, such
as README.md, waited for a check that never started.

src/devops_cli/github/workflow_triggers.py applies the rules of
GitHub's workflow syntax reference, and wcmatch 12.0.4 (MIT, new
dependency) matches each glob. A filter that it cannot judge keeps the
wait: an unread or truncated file list, an unknown base branch, a
malformed filter, or a pattern with ?, + or a ** inside a path
segment, which GitHub reads otherwise. The filters and the item rules
use one compare read. The no-CI line, the help text, the command
documents, the MCP tool listing, the skill and the spec state the rule.

Closes #5408

Change: openspec/changes/archive/2026-11-22-5408-pr-ready-no-workflow/

@dan-petty dan-petty added type/bug Type bug: the code does not do what it must scope/pr The devops pr commands labels Nov 22, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Review points for the owner (#5408):

  1. Patterns that keep the wait. A filter pattern with ?, + or a ** inside a path segment keeps the wait, as on main. GitHub reads ? and + as quantifiers and such a ** as any characters. wcmatch 12.0.4 does not: a probe of the 23 example rows of GitHub's filter pattern cheat sheet gives 4 different answers ('*.jsx?', '**.js', v[12].[0-9]+.[0-9]+, releases/**-alpha). No Python library that I found reads GitHub's quantifiers. nektos/act does in Go (pkg/workflowpattern).
  2. The types key is not judged (design decision 8). A pull_request event with only types: [closed] keeps the wait, as on main. ready_for_review can start a check after pr ready runs, so a rule for types needs its own decision.
  3. pull_request_target is read at the head commit, as the pr-merge-readiness spec says. GitHub runs that event from the workflow file of the base branch, so a pull request that changes such a file can get a different answer. This is the same as on main.
  4. Fail-to-Pass evidence: the Fail-to-Pass Check of head 11ab26a0f passed: https://github.com/dan-petty/devops-cli/actions/runs/45076232522/job/137373950844
  5. Real data: starts_on_pull_request on the k8s.yml and lint.yml workflows of dan-petty/homelab gives false for both with the files of homelab PR feat(tf): infracost finops cloud cost estimation and reporting #97 (.github/renovate.json, README.md), true for both with k8s/apps/app.yaml, and true only for lint.yml with ansible/site.yml. On the 19 workflows of this repository, a change of src/devops_cli/commands/pr.py still starts 5 workflows.

Pending a person: review the diff in tuicr (tuicr -r origin/main..HEAD).

@dan-petty
dan-petty force-pushed the fix/5408-pr-ready-no-workflow branch from 5e00415 to 56f3a2f Compare November 22, 2026 22:39
@dan-petty
dan-petty marked this pull request as ready for review November 22, 2026 22:56
@dan-petty
dan-petty merged commit 24cc5fe into main Nov 22, 2026
37 checks passed
@dan-petty
dan-petty deleted the fix/5408-pr-ready-no-workflow branch November 22, 2026 23:00
dan-petty pushed a commit that referenced this pull request Nov 22, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.195.4](v0.195.3...v0.195.4)
(2026-11-22)


### Bug Fixes

* **ai:** show the newest index time in rag status
([#6801](#6801))
([1193d4c](1193d4c))
* **pr:** judge the branch and path filters of pull request workflows
([#6803](#6803))
([24cc5fe](24cc5fe)),
closes [#5408](#5408)

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/pr The devops pr commands type/bug Type bug: the code does not do what it must

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(pr): pr ready waits for checks that no workflow starts

1 participant