Add forge issue comment subcommand #76

Merged
vnprc merged 3 commits from agent/issue-comment-subcommand into master 2026-06-27 15:28:49 +01:00
Member

Closes #75

Adds forge issue comment <number> [-b <text> | -F <file>] mirroring the existing forge pr comment interface. Both use the same Forgejo API endpoint (/repos/$REPO/issues/$number/comments), but having a dedicated issue comment subcommand avoids forcing users to know they need pr comment for issues.

Changes:

  • forge: added issue_comment() function, dispatch entry, command-level help, and usage text
  • tests/forge/testlib.sh: mock now returns a proper JSON object for POST to the issue-20 comments endpoint
  • tests/forge/mutations.sh: two new tests (inline body and file body)
  • tests/forge/validation.sh: new test for missing body rejection
  • tests/forge/help.sh: new test for --help output

Validation

cd /path/to/allod/tools
bash tests/forge/mutations.sh
bash tests/forge/validation.sh
bash tests/forge/help.sh

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.

Closes #75 Adds `forge issue comment <number> [-b <text> | -F <file>]` mirroring the existing `forge pr comment` interface. Both use the same Forgejo API endpoint (`/repos/$REPO/issues/$number/comments`), but having a dedicated `issue comment` subcommand avoids forcing users to know they need `pr comment` for issues. Changes: - `forge`: added `issue_comment()` function, dispatch entry, command-level help, and usage text - `tests/forge/testlib.sh`: mock now returns a proper JSON object for POST to the issue-20 comments endpoint - `tests/forge/mutations.sh`: two new tests (inline body and file body) - `tests/forge/validation.sh`: new test for missing body rejection - `tests/forge/help.sh`: new test for `--help` output ## Validation ```bash cd /path/to/allod/tools bash tests/forge/mutations.sh bash tests/forge/validation.sh bash tests/forge/help.sh ``` 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.
Author
Member

Added two refactoring commits: extracted shared post_comment helper (used by both pr_comment and issue_comment) and shared edit_resource helper (used by both pr_edit and issue_edit). Net -50 lines.

Added two refactoring commits: extracted shared `post_comment` helper (used by both `pr_comment` and `issue_comment`) and shared `edit_resource` helper (used by both `pr_edit` and `issue_edit`). Net -50 lines.
vnprc approved these changes 2026-06-27 15:28:43 +01:00
vnprc merged commit dca2f5ce9c into master 2026-06-27 15:28:49 +01:00
vnprc deleted branch agent/issue-comment-subcommand 2026-06-27 15:28:49 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
allod/tools!76
No description provided.