feat: add explicit repo/revision/location target parsing for :Forge #144
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#144
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?
Prerequisites
Problem
Issue #142 proposes first-class repo/revision/location targeting, but Forge still mostly derives remote context from the current checkout and
originURL.That is not expressive enough for:
We need a real address model rather than a single implicit current-repo assumption.
Proposed solution
Add a dedicated target/address module for
:Forge.Address types
Repo address
Examples:
upstreamoriginowner/repogithub.com/owner/repogitlab.com/group/subgroup/repoRevision address
Examples:
@main@abc1234upstream@mainowner/repo@v1.2.3Location address
Examples:
upstream@main:README.mdupstream@main:lua/forge/init.lua#L10upstream@main:lua/forge/init.lua#L10-L40Resolution rules
Resolve repo addresses in this order:
Suggested API shape
Introduce typed parsed targets rather than a single generic “scope” blob:
RepoAddressRevAddressLocationAddressThe command layer can then normalize these into existing backend repo arguments (
-R,--repo) as needed.Initial consumers
pr list/issue list/release listuse repo addressesci listuses repo + revision addressesbrowseuses revision + location addressespr createuseshead=andbase=revision addressesAcceptance criteria
@rev,repo@rev, andrepo@rev:path#Lx-LyAlternatives considered
Implemented in #150.