Skip to content

Boazreicher/add suggest to labels and issue fields#2557

Open
boazreicher wants to merge 3 commits into
mainfrom
boazreicher/add-suggest-to-labels-and-issue-fields
Open

Boazreicher/add suggest to labels and issue fields#2557
boazreicher wants to merge 3 commits into
mainfrom
boazreicher/add-suggest-to-labels-and-issue-fields

Conversation

@boazreicher
Copy link
Copy Markdown
Contributor

Summary

Followup to #2548

  • Adds is_suggestion args for updating issue fields and labels
  • Fixes an issue with the suggestion implementation for isuse types

Context

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

Copilot AI review requested due to automatic review settings May 27, 2026 13:29
@boazreicher boazreicher requested a review from a team as a code owner May 27, 2026 13:29
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_suggestion support for label objects in update_issue_labels and for field entries in set_issue_fields, mapping it to the API’s suggest field.
  • Update update_issue_type suggestion behavior to send suggest:true in 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 thread pkg/github/issues_granular.go Outdated
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants