Skip to content

Adopt upstream #1331 (pr-search must include all PR states) into this fork #16

Description

@pseudoseed

Upstream cluesmith/codev#1331 by @waleedkadous fixes pr-search so merged PRs are found, not just open ones. It is open and unmerged upstream.

This fork is on GitHub, so if the bug is real in scripts/forge/github/pr-search.sh, we have it. A PR search that silently misses merged PRs returns a wrong answer at exit 0, which is the failure mode that costs the most to notice.

Why this is its own issue

#12 implements pr-search for gitea and deliberately does NOT touch the github or gitlab scripts. That was the right call: editing cluesmith#1331 diff in our fork guarantees a conflict on every upstream sync for a file we did not otherwise need to change.

Adopting it is the pattern we already used for our own stranded PRs (cluesmith#1146, cluesmith#1458): merge the upstream branch into the fork now, get the fix today, and have the eventual upstream merge resolve as a no-op.

Work

  1. Read Fix #759: pr-search includes all PR states so merged PRs are found cluesmith/codev#1331 and its review. Per the Forgejo/Gitea forge parity: implement pr-search and pr-diff, fix the pr-exists hang #12 builder, the REVIEW is the load-bearing part: an all-states pr-search breaks spawn-worktree.ts in:body query, so callers that need open-only must say is:open explicitly. Adopting the code without that change would introduce a bug rather than fix one.
  2. Confirm the bug reproduces against this repo before changing anything. If gh already returns merged PRs for our query shape, there is nothing to adopt.
  3. Merge the upstream branch rather than hand-copying the diff, so the future sync is clean.

Do not

Do not re-derive the fix by hand. That produces a different diff that conflicts with the real one when it lands.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/coreCore libraries and shared logicbugSomething isn't workingfork-onlyDeliberately not upstreamed to cluesmith/codev

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions