feat: add update_issue MCP tool #25
No reviewers
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
test:label-a
test:label-b
test:set-label
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ldraney/forgejo-mcp!25
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "15-add-update-issue-tool"
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?
Summary
Adds
update_issueMCP tool wrapping the SDK'sissue_edit_issuemethod. Closes the dogfooding gap discovered during incident response (claude-custom#160) where updating issue titles/bodies required rawcurl PATCH.Changes
src/forgejo_mcp/tools/workflows.py: Addedupdate_issuetool with paramsowner,repo,issue_number, optionaltitle, optionalbody. Validates at least one field is provided before calling the SDK. Follows thecreate_issuepattern exactly (same decorator style, error handling, return shape).tests/test_update_issue.py: 4 integration tests using@requires_forgejopattern -- update body only, update title only, update both, and validation error when neither provided. Each test creates a disposable issue and closes it in cleanup.Test Plan
pytest tests/ -vruff formatandruff checkpass cleanReview Checklist
Related Notes
claude-custom#160-- incident that exposed the dogfooding gapproject-pal-e-agency-- enforcement architectureQA Review -- PR #25
Tool Implementation (
workflows.py, +31 lines)create_issuepattern exactly: same@mcp.tool()decorator,Annotated[..., Field(...)]params,json.dumpsreturn,_error_response(exc)catch-all.owner,repo,issue_number, optionaltitle, optionalbody.titleandbodyareNone.number,url,title) matches "returns updated issue number and URL" criterion.create_issueand beforecreate_issue_and_branchis logical.Tests (
test_update_issue.py, +114 lines)@requires_forgejointegration pattern (not unit tests). Correct per issue spec.issue_get_issue), cleans up infinally.forgejo_clientfixture since it short-circuits before API calls.SOP Compliance
ruff formatandruff checkpassCloses #15present for auto-closeNits
None.
VERDICT: APPROVE -- Clean, minimal implementation. No fixes needed.