Add Forge issue organization commands #86
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "agent/forge-issue-organization"
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?
Add
forgesupport for organizing issue backlogs with labels and milestones.Scope:
forge issue listandforge issue view.Acceptance:
Validation:
bash -n forgetests/forge/*.shallod/toolsfor label/milestone endpoints and project unavailability.closes #85
do these commands match gh patterns?
Mostly, but not exact
ghparity.Matches or closely follows
gh:forge issue create -l/--labeland-m/--milestonematchgh issue create's label/milestone flags.forge issue close -c/--comment,-r/--reason, and--duplicate-ofmatchgh issue close.forge label list/create/edit/deletefollows the same resource/verb shape asgh label ....Main differences I see:
gh label createisgh label create <name> [--color ... --description ...]; this PR usesforge label create --name <name> --color <hex>. That is consistent with the existing explicitforgecreate style, but not the same muscle memory asgh.gh issue editmutates labels and milestones inline with--add-label,--remove-label,--milestone, and--remove-milestone. This PR hasforge issue labels ...,forge issue milestone ..., andissue edit --clear-milestone; those are reasonable Forge-specific helpers, but they are not the exactgh issue editshape.ghdoes not appear to have a top-levelgh milestoneporcelain command, soforge milestone ...is a Forge-specific backlog command rather than aghmirror.gh label listhas list controls like--limit,--sort,--order, and--search; this implementation is narrower.So my read is: yes for the general command grammar and the most important issue/label flags, no for strict parity. If exact
ghmuscle memory is the goal, I would add thegh issue editlabel/milestone flags and consider makinglabel create <name>work as an alias forlabel create --name <name>. Otherwise, I would document these as deliberateforgedepartures.Follow-up request from this review thread: update the new issue organization commands to match
ghpatterns as closely as Forgejo's API allows, push those changes to this PR, then run an independent code review pass, post the review results here, and address any findings in a follow-up commit.Independent review pass after
dc4dde9found the following:forge label delete <name>accepts--yesbut does not require it or prompt before deletion. The help/docs present--yesas the confirmation bypass, matchinggh label delete, so the current behavior is more destructive than the public contract implies.forge issue listapplies label/milestone/search filters only after fetching the unfiltered--limitresults. That can omit matching issues outside the first page; Forgejo exposes server-side issue query params for this.bug,because Bash drops the trailing empty field, even though interior empty values are rejected.Validation from the review agent: read-only diff review,
git diff --check master...HEAD,bash -n forge tests/forge/*.sh, executable Forge tests, andbash tests/forge/pr-close.sh.shellcheckwas not installed.I am fixing these in a follow-up commit.
Fixed the independent review findings in
e8a8290:label deletenow requires--yesbefore resolving/deleting a label.issue listnow sendslabels,milestones, andqto the Forgejo issue API instead of filtering only the first fetched page locally.bug,.Validation after the fixes:
bash -n forgefor t in tests/forge/*.sh; do bash "$t"; donegit diff --checkI opened this PR under my own account using the
allod patchtool. You can't approve your own PRs so I am manually merging to master.