resolver: add branch-relative non-open PR lookup beside current_pr() #453
Labels
No labels
bug
documentation
duplicate
enhancement
fugitive
good first issue
help wanted
invalid
question
v0.1.0
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
barrettruth/forge.nvim#453
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
current_pr()is intentionally open-PR-only today.That is the right semantic model for flows like:
:Forge pr:Forge reviewBut it leaves no principled branch-relative resolver for workflows that may want to recover a non-open PR for the current branch, such as:
:Forge pr reopen:Forge pr cifallback on closed or merged PRs (tracked separately in #450)Broadening
current_pr()globally would blur the difference between “current open PR” and “the latest/unique PR for this branch regardless of state”, which are not the same concept.Proposed solution
Add a second branch-relative PR resolver instead of broadening
current_pr().The new resolver should be able to search selected PR states for the current branch context while preserving the same repo/head disambiguation semantics as the current open-PR resolver.
Examples of the policy space it should support:
The exact public/internal shape is flexible, but it should make the distinction between “current open PR” and “current branch PR under a broader state policy” explicit.
Acceptance criteria
current_pr()remains open-PR-onlyrepo=/head=disambiguation model as the open-only resolverpr reopenand #450Alternatives considered
current_pr()globally to include closed/merged PRsStarting implementation here next.
Planned shape:
current_pr()open-onlyThis will be the resolver/backend foundation for the rest of the stack.