Add forge issue comment subcommand #76
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "agent/issue-comment-subcommand"
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?
Closes #75
Adds
forge issue comment <number> [-b <text> | -F <file>]mirroring the existingforge pr commentinterface. Both use the same Forgejo API endpoint (/repos/$REPO/issues/$number/comments), but having a dedicatedissue commentsubcommand avoids forcing users to know they needpr commentfor issues.Changes:
forge: addedissue_comment()function, dispatch entry, command-level help, and usage texttests/forge/testlib.sh: mock now returns a proper JSON object for POST to the issue-20 comments endpointtests/forge/mutations.sh: two new tests (inline body and file body)tests/forge/validation.sh: new test for missing body rejectiontests/forge/help.sh: new test for--helpoutputValidation
All three suites should pass with no failures. Remaining test suites (read, auth, token, pr-close, issue-close) are unaffected but can be run for confidence.
Added two refactoring commits: extracted shared
post_commenthelper (used by bothpr_commentandissue_comment) and sharededit_resourcehelper (used by bothpr_editandissue_edit). Net -50 lines.