Skip to content

forge: github pr-search.sh defaults to open PRs only; post-merge consult fails to find merged PRs #759

@waleedkadous

Description

@waleedkadous

Symptom

After PR #757 merged, the post-merge `consult --type pr` step failed with `No PR found for branch: builder/spir-755`. The same lookup worked pre-merge.

Root cause

`packages/codev/skeleton/forge/scripts/github/pr-search.sh` (or wherever `pr-search` lives in the forge layer) uses `gh pr list --search "...":` which defaults to filtering by `state:open`. Once a PR merges, this lookup returns nothing.

Fix shape

Add `--state all` (or equivalent flag) to the underlying `gh pr list` call so the search includes merged + closed PRs.

Suggested protocol

BUGFIX — single small flag addition in one script.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions