Repository navigation
Description
Problem Description
In a repository with no GitHub Actions workflow, devops pr monitor and devops pr check-readiness take the head commit with no check as a running check. The check verdict puts the pending stand-in "no checks reported" in place of the missing checks. check-readiness exits 1 with "PR # has 1 check(s) still running: no checks reported.", and pr monitor waits until its timeout and exits 3. No check will start in such a repository, for example dan-petty/homelab (actions/workflows total_count 0 on 2026-11-12).
Pull request #5142 (#3767) fixes the same case for devops pr ready only: when the head commit reports no check and GitHubClient.count_workflows gives 0, it does not judge the checks. pr monitor and check-readiness read the merge-readiness verdict and did not change.
Reproduction Steps
- Open a draft pull request in a repository with no workflow, such as
dan-petty/homelab. - Run
uv run devops pr check-readiness <n> --repo dan-petty/homelab. - Run
uv run devops pr monitor <n> --repo dan-petty/homelab.
Expected vs Actual Behavior
Expected: both commands use the rule of pr ready. When the head commit reports no check run and no commit status and the repository has no workflow, the missing checks are no blocker, and the output says that the repository has no CI.
Actual: check-readiness exits 1 with a running-check blocker. pr monitor waits for the stand-in until the timeout and exits 3.
Environment Diagnostics
devops-cli at origin/main after #5142. The verdict is assess_merge_readiness in src/devops_cli/github/merge_readiness.py (_judge_checks); the stand-in is no_checks_reported() in src/devops_cli/github/check_verdict.py, and CheckVerdictSummary.reports_nothing detects it.
Logs, Traces, or Terminal Output
Before #5142, devops pr ready 19 --repo dan-petty/homelab refused with "A check runs: no checks reported" (0 check runs, 0 statuses). The same stand-in reaches check-readiness and pr monitor through the verdict.
Pre-Submission Checklist
- I have verified that no sensitive credentials, private keys, or internal tokens are contained in this issue report.
- I have checked existing issues and pull requests to ensure this is not a duplicate.
Source: #3767
Alternatives check of 2026-11-16: none.
Tool: none found.
Proposed design
Problem statement
A repository with no pull-request workflow gives the head commit no check. devops pr check-readiness exits 1 and devops pr monitor waits until timeout because both read the pending stand-in no checks reported. The existing count_workflows test counts workflows on any branch and does not read the triggers. The fix SHALL read the workflows at the head commit and suppress the stand-in when no workflow can run on a pull request. It SHALL also stop pr monitor on a merge conflict before it waits on that stand-in.
Acceptance criteria
Requirement: No workflow at head suppresses pending check
When the head commit reports no check and holds no workflow file, the merge-readiness verdict SHALL NOT add a pending-check blocker.
Scenario: No workflow at head
- WHEN A test calls
assess_merge_readinesswith a fake session that returns no check runs and a 404 forcontents/.github/workflowsat the head SHA. - THEN The test asserts that
BlockerKind.CHECKS_PENDINGis not inverdict.kindsand that an INFO advisory says the repository has no CI for the pull request.
Requirement: Pull-request workflow keeps pending check
When a workflow at the head commit lists pull_request or pull_request_target, the merge-readiness verdict SHALL keep the pending stand-in until a check starts.
Scenario: Pull-request workflow exists
- WHEN A test gives the head commit one workflow file whose
onkey listspull_requestand gives no check runs. - THEN The test asserts that
BlockerKind.CHECKS_PENDINGis inverdict.kindsand thatverdict.pending_checkscontainsno checks reported.
Requirement: Non-pull-request workflow suppresses pending check
When every workflow at the head commit lists only triggers other than pull_request and pull_request_target, the merge-readiness verdict SHALL NOT add a pending-check blocker.
Scenario: Workflow with push and workflow_dispatch only
- WHEN A test gives the head commit one workflow file with only
pushandworkflow_dispatchtriggers and gives no check runs. - THEN The test asserts that
BlockerKind.CHECKS_PENDINGis not inverdict.kindsand that the no-CI advisory is present.
Requirement: Unread workflow fails closed
When the workflow read fails, the merge-readiness verdict MUST keep the pending stand-in.
Scenario: Workflow read error
- WHEN A test makes the workflow contents read raise
GitHubOperationErrorand gives no check runs. - THEN The test asserts that
BlockerKind.CHECKS_PENDINGis inverdict.kindsand thatverdict.pending_checkscontainsno checks reported.
Requirement: check-readiness reports no CI
devops pr check-readiness SHALL exit 0 with a no-CI message when no workflow can run on the head commit and no other blocker applies.
Scenario: check-readiness on a repository with no CI
- WHEN A test runs
devops pr check-readinesswith a fake GitHub session for a pull request whose head commit holds no workflow and no check. - THEN The test asserts exit code 0 and that the output contains the no-CI advisory.
Requirement: pr monitor does not wait for no CI
devops pr monitor SHALL stop without a timeout when no workflow can run on the head commit and no other blocker applies.
Scenario: pr monitor on a repository with no CI
- WHEN A test runs
devops pr monitorwith a fake clock and a pull request whose head commit holds no workflow and no check. - THEN The test asserts exit code 0 and that the monitor made no sleep call.
Requirement: pr ready uses head workflow read
devops pr ready SHALL use the head-workflow read instead of GitHubClient.count_workflows to decide that no check can start.
Scenario: pr ready with a push-only workflow
- WHEN A test runs
devops pr readyfor a pull request whose head commit holds a workflow with onlypushandworkflow_dispatchtriggers and no check. - THEN The test asserts that
pr readymarks the draft ready and does not refuse with theno checks reportedblocker.
Requirement: pr monitor stops on conflict before pending checks
devops pr monitor SHALL report a merge conflict and stop before it waits on the pending no-checks stand-in.
Scenario: Conflict with no checks
- WHEN A test gives
assess_merge_readinessamergeable_stateofdirtyand no check runs, then runsdevops pr monitor. - THEN The test asserts that the output names the merge conflict and that the monitor made no sleep call.
Existing Tool Considered
The alternatives check of 2026-11-16 found no open, maintained tool or library that covers this need. The change edits existing code in src/devops_cli/github/merge_readiness.py, src/devops_cli/github/check_verdict.py and src/devops_cli/commands/pr.py; it adds no dependency. Written cost: about 8,000 tokens and 1 engineer-day to build and test. Keep cost: no new component, only the existing test suite.
Key questions
- Which function detects the pending stand-in for a commit that reports no check?:
CheckVerdictSummary.reports_nothingreturns true when the summary has no unread reason and its items equal[no_checks_reported()]. [sources: src/devops_cli/github/check_verdict.py] - How does the code decide that no CI can run on the head commit?: It lists
.github/workflowsat the head SHA and parses each YAML file'sonkey. It treats the commit as no-CI only when no file listspull_requestorpull_request_target. A 404 or an empty folder means no CI. A read error keeps the pending stand-in. (best practice) [sources: src/devops_cli/github/merge_readiness.py, src/devops_cli/github/check_verdict.py, src/devops_cli/github/client.py]- Rejected: Use
GitHubClient.count_workflows. It counts workflows on any branch and ignores triggers, so it gives false positives for a workflow on another branch or a workflow with no pull-request trigger. - Rejected: Read workflow files at the head SHA only. A workflow file with only
pushorworkflow_dispatchtriggers cannot start a check on the pull request. - Chosen: Read workflow files at the head SHA and parse their triggers. It answers whether a check can start on the head commit and covers both the no-workflow and the wrong-trigger cases.
- Rejected: Use
- Where does the no-CI rule live so all three commands use it?: It lives in
_judge_checksofassess_merge_readiness, sopr check-readiness,pr monitorandpr readyshare one verdict.pr readyuses the same helper in place of itscount_workflowsbranch. (best practice) [sources: src/devops_cli/github/merge_readiness.py:259, src/devops_cli/github/pr_monitor.py, src/devops_cli/commands/pr.py]- Rejected: Fix each command separately. Three copies drift, and fix(pr): pr create fits a repository without openspec #5142 already left
pr monitorandcheck-readinessbehind. - Chosen: Share the rule in the merge-readiness verdict. All three commands read the same verdict, and one test covers the shared decision.
- Rejected: Fix each command separately. Three copies drift, and fix(pr): pr create fits a repository without openspec #5142 already left
- What does the verdict report when no CI can run on the pull request?: It adds no
CHECKS_PENDINGblocker. It adds an INFO advisory that the repository has no CI for the pull request. Thecheckssummary stays as read. (best practice) [sources: src/devops_cli/github/merge_readiness.py, src/devops_cli/github/check_verdict.py]- Rejected: Suppress the blocker with no message. A person must see why no check appears.
- Rejected: Add a warning advisory. No action is needed, so a warning adds noise.
- Chosen: Add an INFO advisory. It explains the missing check without blocking the pull request.
- How does
pr monitorhandle a merge conflict when the head reports no check?: It reads theCONFLICTblocker before the pending checks and stops at once. It names the conflict and does not sleep for the pending stand-in. (best practice) [sources: src/devops_cli/github/merge_readiness.py, src/devops_cli/github/pr_monitor.py]- Rejected: Wait for checks. No check starts on a dirty pull request, so the monitor times out.
- Chosen: Stop on conflict before pending checks. The conflict is the real blocker and the verdict already names it.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 12, 2026
Both concern pr monitor reading the merge-readiness verdict, but 2443 built the shared verdict while this candidate fixes a no-CI case that verdict misjudges.dan-petty commentedon Nov 12, 2026
A second case of the same rule, in
devops pr ready(2026-11-12).GitHubClient.count_workflowsreadsrepos/<repo>/actions/workflows, which counts each workflow that ran on any branch. dan-petty/homelab PR #28 adds.github/workflows/lint.yml, and its run registered the workflow, sototal_countbecame 1.mainand the heads of PRs #26 and #27 hold no workflow file, so no check can start on them (commits/8717904/check-runstotal_count0). Thendevops pr ready 26 --repo dan-petty/homelabrefused: "Cannot mark PR #26 as ready for review: A check runs: no checks reported." I used--forcefor #26 and #27.Expected: the rule asks whether a workflow can run on the head commit, for example
contents/.github/workflows?ref=<head sha>(a 404 or an empty folder means no CI for that pull request), not whether the repository registers a workflow. The fix of this issue forpr monitorandcheck-readinesscan use the same read.dan-petty commentedon Nov 13, 2026
A second case with the same symptom, in a repository that has CI: a pull request with a merge conflict.
On 2026-11-13, pull request #5312 got a conflict when #5309 merged. GitHub gave
mergeable_state: dirtyand started nopull_requestworkflow, so the head commit had no check run.devops pr monitor 5312showed the stand-in and waited until its timeout. It did not name the conflict:A run with the default 1800 s timeout waits 30 minutes for a check that cannot start. Expected: when the pull request is
dirty(ormergeableisfalse) and the head reports no check, the monitor stops at once and names the conflict as the blocker. The CONFLICT verdict of #5021 covers this case too.dan-petty commentedon Nov 13, 2026
devops pr readyhas a related gap: a repository that has a workflow, but no workflow that runs on a pull request.On 2026-11-13,
uv run devops pr ready 2 --repo retric-ai/retric.airefused with "A check runs: no checks reported." The head commit had 0 check runs and 0 commit statuses. The repository has one workflow,.github/workflows/pages.yml, with only thepush(branchmain) andworkflow_dispatchtriggers. Thuscount_workflowsgives 1, and the #5142 rule does not apply. No check will start on this pull request.Expected:
pr ready,pr check-readinessandpr monitortreat a repository with no workflow that triggers onpull_requestorpull_request_targetthe same as a repository with no workflow.That pull request stays a draft until a person marks it ready.
devops-cli-service commentedon Nov 16, 2026
Alternatives check: none
Reason: The issue is a bug fix in the project's own code (devops-cli):
pr monitorandpr check-readinessmust stop treating the absence of checks as a pending stand-in when a repository has no CI workflow. Searches for an external tool or library that handles PR readiness for repositories with no CI found no applicable product; this is internal logic the project implements itself in its merge-readiness and check-verdict modules.Tool: none found
Searches run:
Checked on 2026-11-16. A person decides what this means for the item. The check changes no label and closes no issue.
devops-cli-service commentedon Nov 17, 2026
Status set to Ready at c58b592 (see proposed design in issue body).
devops-cli-service commentedon Nov 17, 2026
Released in v0.173.1: https://github.com/dan-petty/devops-cli/releases/tag/v0.173.1
devops-cli-service commentedon Nov 17, 2026
Live since 2026-11-17 15:42 UTC
refactor(pr): read the readiness checks with gh pr checks (#7519)