Boazreicher/add suggest to labels and issue fields#2557
Open
boazreicher wants to merge 3 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the issues-granular toolset’s “suggestion” capability beyond issue type updates by adding an is_suggestion flag for issue label entries and issue field updates, and aligns issue type suggestions with the API’s suggest:true wire format (instead of returning a locally marshaled “suggested” payload).
Changes:
- Add
is_suggestionsupport for label objects inupdate_issue_labelsand for field entries inset_issue_fields, mapping it to the API’ssuggestfield. - Update
update_issue_typesuggestion behavior to sendsuggest:truein the PATCH request body. - Update toolsnaps (schema snapshots) and adjust unit test(s) for issue type suggestions accordingly.
Show a summary per file
| File | Description |
|---|---|
| pkg/github/issues_granular.go | Adds is_suggestion parsing and maps it to API suggest for issue labels, issue type, and issue fields. |
| pkg/github/granular_tools_test.go | Updates update_issue_type suggestion test to assert the outgoing PATCH request body. |
| pkg/github/toolsnaps/update_issue_type.snap | Updates schema description for is_suggestion. |
| pkg/github/toolsnaps/update_issue_labels.snap | Adds nested is_suggestion to label object schema snapshot. |
| pkg/github/toolsnaps/set_issue_fields.snap | Adds nested is_suggestion to field entry schema snapshot. |
| docs/feature-flags.md | Documents the is_suggestion parameter for update_issue_type. |
Copilot's findings
- Files reviewed: 6/6 changed files
- Comments generated: 3
Comment on lines
+390
to
+394
| isSuggestion, err := OptionalParam[bool](v, "is_suggestion") | ||
| if err != nil { | ||
| return utils.NewToolResultError(err.Error()), nil, nil | ||
| } | ||
| if rationale == "" && !isSuggestion { |
Comment on lines
+1076
to
+1080
| isSuggestion, err := OptionalParam[bool](fieldMap, "is_suggestion") | ||
| if err != nil { | ||
| return utils.NewToolResultError(err.Error()), nil, nil | ||
| } | ||
| if isSuggestion { |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Followup to #2548
is_suggestionargs for updating issue fields and labelsContext
Allows agents to only suggest a change to an issue's type, labels or fields, and a user can then choose whether to reject or apply it.
Why
Closes https://github.com/github/plan-track-agentic-toolkit/issues/128