Skip to content

fix(pr): pr create --dry-run checks the title form #5178

Closed

Description

@dan-petty

Problem Description

devops pr create --dry-run does not check the title form that the real run checks. On 2026-11-12, the dry run of a pull request in dan-petty/homelab with the title feat(devops): ... printed the requests and "Opened a draft pull request into the default branch". The real run then refused: "The scope devops has no label: .github/labels.yml does not declare scope/devops." So the dry run does not show that the run will open nothing. Its first line also says "Opened", but a dry run opens nothing.

Reproduction Steps

  1. Push a branch to a repository whose .github/labels.yml declares no scope/* label, such as dan-petty/homelab.
  2. Run uv run devops pr create --repo <repo> --head <branch> --title "feat(devops): a change" --body "Closes #<n>" --dry-run.
  3. Run the same command without --dry-run.

Expected vs Actual Behavior

Expected: the dry run checks the title and the body as the real run does, from local data or the labels.yml read that it lists, and reports the same refusal. A dry run says "Would open" or names the plan, not "Opened".

Actual: the dry run exits 0 with "Opened a draft pull request" and the plan. The real run exits 1 with the scope refusal.

Environment Diagnostics

devops-cli at origin/main ad782a6. The scope check needs .github/labels.yml of the base branch, a GitHub read. Per the dry-run rule, the dry run makes no request, so it can list the read and state that the run refuses a scope that the file does not declare.

Logs, Traces, or Terminal Output

$ uv run devops pr create --repo dan-petty/homelab --head feat/25-devops-project-file --title "feat(devops): declare the project profile in .devops/project.toml" --body "Closes #25" --dry-run
Opened a draft pull request into the default branch. When its checks pass, mark it ready with devops pr ready.
  1. gh pr create --draft --title 'feat(devops): ...' ...
$ uv run devops pr create ... (same, without --dry-run)
✗ The pull request breaks the form. Nothing was opened:
- The scope `devops` has no label: .github/labels.yml does not declare `scope/devops`. Use a scope with a label, or declare the label in the same pull request.

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: https://github.com/dan-petty/homelab/pull/26

Activity

  1. added
    source/agent
    type/bug
    scope/pr
    status/new
    value/medium
    effort/low
    on Nov 12, 2026
  2. dan-petty commented on Nov 12, 2026

    @dan-petty
    OwnerAuthor
  3. added
    priority/p2-medium
    on Nov 12, 2026
  4. dan-petty commented on Nov 13, 2026

    @dan-petty
    OwnerAuthor

    Seen again on 2026-11-13 at origin/main 54cf0a5, in this repository: uv run devops pr create --dry-run --title "fix(github): ..." --body "..." printed "Opened a draft pull request into the default branch. When its checks pass, mark it ready with devops pr ready." and the plan. The dry run opened nothing, so the first line is wrong. The form check of the body did run in the dry run (it refused a body of 1016 characters).

  5. added
    status/in-review
    and removed
    status/new
    on Nov 15, 2026
  6. removed
    status/in-review
    on Nov 15, 2026
  7. devops-cli-service commented on Nov 15, 2026

    @devops-cli-service
    Contributor
  8. devops-cli-service commented on Nov 15, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-15 12:41 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p2-mediumscope/prsource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions