You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enforce and advertise the method enum for method-dispatch tools
The consolidated method-dispatch tools returned a bare "unknown method: <x>"
with no hint of valid values, and each tool's valid method set lived only in
its schema enum (or, for sub_issue_write, only in prose). labels.go already
listed the supported methods on an unknown value; this brings the rest in line
and makes the advertised methods the single source of truth.
- Each tool's method set is a single []string that feeds both the input-schema
enum (methodEnum) and the unknown-method error (unknownMethodError), so the
advertised methods and the accepted methods cannot drift apart.
- An unknown method now lists the supported set:
"unknown method: x. Supported methods are: ...".
- pull_request_review_write decoded args with WeakDecode (no RequiredParam), so
an omitted method surfaced as "unknown method: " (empty). It now reports
"missing required parameter: method", consistent with the other tools.
- sub_issue_write advertised its method options only in the description; it now
declares the enum like every other method-dispatch tool.
Closes#2712
Copy file name to clipboardExpand all lines: pkg/github/__toolsnaps__/sub_issue_write.snap
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,11 @@
19
19
},
20
20
"method": {
21
21
"description": "The action to perform on a single sub-issue\nOptions are:\n- 'add' - add a sub-issue to a parent issue in a GitHub repository.\n- 'remove' - remove a sub-issue from a parent issue in a GitHub repository.\n- 'reprioritize' - change the order of sub-issues within a parent issue in a GitHub repository. Use either 'after_id' or 'before_id' to specify the new position.\n\t\t\t\t",
8. get_comments - Get comments on a pull request. Use this if user doesn't specifically want review comments. Use with pagination parameters to control the number of results returned.
43
50
9. get_check_runs - Get check runs for the head commit of a pull request. Check runs are the individual CI/CD jobs and checks that run on the PR.
0 commit comments