Add update_issue tool — expose SDK's issue_edit_issue #15

Closed
opened 2026-03-26 03:19:47 +00:00 by forgejo_admin · 1 comment
Contributor

Type

Feature

Lineage

Discovered scope from incident-fix claude-custom#160. Dogfooding gap — had to drop to raw curl PATCH to update an issue body because no MCP tool exists.

Repo

forgejo_admin/forgejo-mcp

User Story

As platform operator,
I want to update Forgejo issue titles and bodies via MCP tool,
So that ticket scope consolidation doesn't require raw curl.

Context

During the GroupMe incident response (2026-03-25), issue #160 on claude-custom went through 3 rounds of scope expansion via comments. Consolidating the spec into the issue body required curl -X PATCH because forgejo-mcp has no update_issue tool. The SDK already has issue_edit_issue (forgejo-sdk/src/forgejo_sdk/issue.py:278) — this is purely an MCP wrapper gap.

File Targets

Files to modify:

  • src/forgejo_mcp/issues.py (or wherever create_issue lives) — ADD update_issue tool wrapping client.issue_edit_issue(owner, repo, index, body=, title=)

Files NOT to touch:

  • forgejo-sdk — SDK already has the method

Acceptance Criteria

  • mcp__forgejo__update_issue tool available with params: owner, repo, issue_number, optional title, optional body
  • At least one of title or body required
  • Returns updated issue number and URL
  • Follows existing tool patterns in forgejo-mcp

Test Expectations

  • Unit test: update issue body
  • Unit test: update issue title
  • Unit test: update both
  • Run command: cd ~/forgejo-mcp && pytest tests/

Constraints

  • Follow existing tool patterns in forgejo-mcp (same decorator style, error handling)
  • forgejo-mcp uses uv, Forgejo PyPI for forgejo-sdk dependency

Checklist

  • PR opened
  • Tests pass
  • No unrelated changes
  • project-pal-e-agency — enforcement architecture, dogfooding gap
  • claude-custom#160 — incident that exposed the gap
### Type Feature ### Lineage Discovered scope from incident-fix `claude-custom#160`. Dogfooding gap — had to drop to raw `curl PATCH` to update an issue body because no MCP tool exists. ### Repo `forgejo_admin/forgejo-mcp` ### User Story As platform operator, I want to update Forgejo issue titles and bodies via MCP tool, So that ticket scope consolidation doesn't require raw curl. ### Context During the GroupMe incident response (2026-03-25), issue #160 on claude-custom went through 3 rounds of scope expansion via comments. Consolidating the spec into the issue body required `curl -X PATCH` because forgejo-mcp has no `update_issue` tool. The SDK already has `issue_edit_issue` (`forgejo-sdk/src/forgejo_sdk/issue.py:278`) — this is purely an MCP wrapper gap. ### File Targets Files to modify: - `src/forgejo_mcp/issues.py` (or wherever `create_issue` lives) — ADD `update_issue` tool wrapping `client.issue_edit_issue(owner, repo, index, body=, title=)` Files NOT to touch: - `forgejo-sdk` — SDK already has the method ### Acceptance Criteria - [ ] `mcp__forgejo__update_issue` tool available with params: `owner`, `repo`, `issue_number`, optional `title`, optional `body` - [ ] At least one of `title` or `body` required - [ ] Returns updated issue number and URL - [ ] Follows existing tool patterns in forgejo-mcp ### Test Expectations - [ ] Unit test: update issue body - [ ] Unit test: update issue title - [ ] Unit test: update both - Run command: `cd ~/forgejo-mcp && pytest tests/` ### Constraints - Follow existing tool patterns in forgejo-mcp (same decorator style, error handling) - forgejo-mcp uses `uv`, Forgejo PyPI for forgejo-sdk dependency ### Checklist - [ ] PR opened - [ ] Tests pass - [ ] No unrelated changes ### Related - `project-pal-e-agency` — enforcement architecture, dogfooding gap - `claude-custom#160` — incident that exposed the gap
Author
Contributor

Scope Review: NEEDS_REFINEMENT

Review note: review-360-2026-03-27
File target path is wrong — src/forgejo_mcp/issues.py does not exist; correct target is src/forgejo_mcp/tools/workflows.py.

Must fix before READY:

  • Change file target from src/forgejo_mcp/issues.py to src/forgejo_mcp/tools/workflows.py
  • Change "Unit test" to "Integration test" in Test Expectations (repo uses @requires_forgejo integration tests, not unit tests)

Also noted:

  • Duplicate board item #365 (claude-custom#162) should be closed as duplicate of this issue
  • SDK method issue_edit_issue verified at forgejo-sdk/src/forgejo_sdk/issue.py:278
  • Traceability complete, acceptance criteria testable, no dependencies, low blast radius
## Scope Review: NEEDS_REFINEMENT Review note: `review-360-2026-03-27` File target path is wrong — `src/forgejo_mcp/issues.py` does not exist; correct target is `src/forgejo_mcp/tools/workflows.py`. **Must fix before READY:** - Change file target from `src/forgejo_mcp/issues.py` to `src/forgejo_mcp/tools/workflows.py` - Change "Unit test" to "Integration test" in Test Expectations (repo uses `@requires_forgejo` integration tests, not unit tests) **Also noted:** - Duplicate board item #365 (claude-custom#162) should be closed as duplicate of this issue - SDK method `issue_edit_issue` verified at `forgejo-sdk/src/forgejo_sdk/issue.py:278` - Traceability complete, acceptance criteria testable, no dependencies, low blast radius
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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
ldraney/forgejo-mcp#15
No description provided.