23: Add forgejo_milestone_edit tool #37
No reviewers
Labels
No labels
bug
chore
documentation
enhancement
feature
ready
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
david/pi-extensions-and-skills!37
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/issue-23/add-forgejo-milestone-edit-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?
23: Add forgejo_milestone_edit tool
Implements 23.
Generated in 8m 32s.
Review findings
Now I have the full picture. Let me look at the test file context for the milestone_edit describe block, and check the AGENTS.md for commit conventions:All context gathered. Now applying the fixes. First, the README tools table (Medium finding):Now the DESIGN.md matrix (Low finding):Now the client-side guard in
src/index.ts(Low finding):ApiErrorCodeisn't imported yet. Let me check the imports at the top of index.ts:Now add a test for the new guard intests/tools.test.ts:Now let me detect and run the build/test gates:The existing API-error test passed onlyid— with the new guard it now (correctly) fails fast. Updating that test to include an editable field so it still exercises the API-error path:All gates pass. Let me verify the working tree diff is clean of unintended artifacts:Let me also verify the root project gates still pass (in case the root has its own config):All gates pass (npm run check,npm run build,npm test— 164 tests, 9 suites). The changes are minimal and consistent. Final annotated findings:Review Findings — 23
Summary
Change adds a
forgejo_milestone_edittool (register +editMilestonePATCH helper + unit tests), matching the pattern of the existing issue/PR edit tools and the milestone create/view tools. Gates run:npm run build(tsc) — PASS;npm run check(tsc --noEmit) — PASS;npm test(jest) — PASS (164 tests, 9 suites); coverage —milestones.ts100% lines/branches and the new tool handler is exercised. Lint is not configured in this repo (no eslint/prettier config or lint script), so no lint gate was available. No correctness bugs or unmet acceptance criteria found (issue has no AC beyond the tool itself). Findings are documentation polish and minor convention items.Remediation applied in this pass: added the
forgejo_milestone_editrow to the README tools table, added the row to the DESIGN.md tool matrix (plus updated the Issues count and the milestone endpoints note), and added a client-side "nothing to change" guard in the tool'sexecute(with a unit test, and updated the existing API-error test to still exercise the error path). The commit-message finding remains unresolved: the pipeline does not commit, so the squash-merge message is decided at merge time by the maintainer.Critical
High
Medium
forgejo_milestone_create,forgejo_list_milestones, andforgejo_milestone_view, but not the newly addedforgejo_milestone_edit. Every prior milestone-tool PR (issues 20/21/22) updated this table, so the user-facing reference is now out of date. Suggested fix: add a row after line 60, e.g.| forgejo_milestone_edit | Edit a milestone by id (title/description/due_on/state; only provided fields change) |.Low
| forgejo_milestone_edit | Edit a milestone by id | id (req), title?, description?, due_on?, state? |.31e28d8) — Commit message is23: Add forgejo_milestone_edit tool, which deviates from AGENTS.md's documentedissue-<N>: <summary>format (e.g.issue-42: add user auth). It does match the forgejo sub-project's local history (22: …,21: …,20: …), so this is a minor standard-vs-practice inconsistency. Suggested fix: useissue-23: Add forgejo_milestone_edit toolon the squash-merge (or accept the local convention and update AGENTS.md).forgejo_milestone_editwith onlyidand no editable fields issues aPATCHwith an empty body{}and relies on the server's 422. This matches the sibling edit tools (forgejo_issue_edit,forgejo_pr_edit), so it is consistent, but a client-side guard ("provide at least one field to change") would give agents a clearer message than a server validation error. Suggested fix: inexecute, before callingeditMilestone, returntoolError/a friendly error whentitle,description,due_on, andstateare all undefined.