cmd/completion: make implicit PR action completion availability-aware #455
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#455
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
The Ex completion model already reuses picker-aligned availability rules for subject policies, but implicit current-PR verb completion is still essentially static.
That becomes more noticeable as the implicit PR action surface grows.
For example, if
:Forge pr merge,close,draft,ready, andreopencan resolve from branch context, then bare:Forge pr <Tab>should not suggest verbs that are unavailable for the current PR state.Similarly,
method=completion for:Forge pr mergeis currently static even though merge availability already depends on repo permissions and backend-supported merge methods.Proposed solution
Make implicit PR action completion availability-aware.
That should include at least:
method=values for:Forge pr mergethrough repo-supported merge methods when repo info is availableExamples of the desired behavior:
approve,merge,close,draft; do not offerreadyorreopenapprove,close,ready; do not offermerge,draft, orreopenreopenreopenAcceptance criteria
:Forge pr ...verb completion is filtered by the current branch PR state when implicit PR targeting is in playmethod=completion for:Forge pr mergeprefers repo-supported merge methods over a static union when repo info can be resolvedRelated
pr reopenTracking note: this stays after #453, #450, and #454. Once the resolver and implicit non-open PR flows land, this can tighten completion so it reflects which implicit PR actions are actually available for the current branch state.
Fixed by merged PR #461.