Skip to content

Change confidence enum to use uppercase values to match GraphQL schema#2715

Merged
RossTarrant merged 5 commits into
mainfrom
reneexeener/fix-confidence-enum
Jun 17, 2026
Merged

Change confidence enum to use uppercase values to match GraphQL schema#2715
RossTarrant merged 5 commits into
mainfrom
reneexeener/fix-confidence-enum

Conversation

@reneexeener

@reneexeener reneexeener commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR standardizes the allowed values for the "confidence" field in issue-related APIs and tools to use uppercase strings ("LOW", "MEDIUM", "HIGH") instead of lowercase to match the GraphQL schema, updating documentation, validation logic, and tests accordingly. This ensures consistency across the codebase and improves clarity for users and developers.

Why

What changed

This pull request standardizes the allowed values for the confidence field in issue-related tools, schemas, and tests. Previously, the confidence field accepted lowercase values (low, medium, high); this change updates all code, documentation, and tests to require uppercase values (LOW, MEDIUM, HIGH) for consistency and clarity.

Schema and Validation Updates:

  • Updated all JSON schema definitions and descriptions for issue-related tools to use uppercase confidence values (LOW, MEDIUM, HIGH) instead of lowercase. This includes the update_issue_type, update_issue_labels, and set_issue_fields tools. [1] [2] [3] [4] [5] [6] [7]
  • Updated runtime validation logic to only accept uppercase confidence values, and updated error messages accordingly. [1] [2] [3]

Documentation Updates:

  • Updated all user-facing documentation and descriptions to reference uppercase confidence values (LOW, MEDIUM, HIGH). [1] [2] [3]

Test Updates:

These changes ensure that the confidence field is consistently handled across the codebase, reducing ambiguity and potential errors.

MCP impact

  • No tool or API changes
  • Tool schema or behavior changed
  • New tool added

Prompts tested (tool changes only)

  • "Suggest an issue type and issue fields for [issue] using available MCP tools. Make sure you create the suggestions."
    • Confirmed that confidence value was correctly applied

Security / limits

  • No security or limits impact
  • Auth / permissions considered
  • Data exposure, filtering, or token/size limits considered

Tool renaming

  • I am renaming tools as part of this PR (e.g. a part of a consolidation effort)
    • I have added the new tool aliases in deprecated_tool_aliases.go
  • I am not renaming tools as part of this PR

Note: if you're renaming tools, you must add the tool aliases. For more information on how to do so, please refer to the official docs.

Lint & tests

  • Linted locally with ./script/lint
  • Tested locally with ./script/test

Docs

  • Not needed
  • Updated (README / docs / examples)

@reneexeener reneexeener marked this pull request as ready for review June 17, 2026 12:37
@reneexeener reneexeener requested a review from a team as a code owner June 17, 2026 12:37
Copilot AI review requested due to automatic review settings June 17, 2026 12:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 updates the issue-related “confidence” parameter to use uppercase values (LOW, MEDIUM, HIGH) to align with the GraphQL schema, updating tool schemas, runtime validation, documentation, and tests for consistency across the MCP server’s issue tooling.

Changes:

  • Updated granular issue tools’ JSON schemas and descriptions to enumerate LOW|MEDIUM|HIGH for confidence.
  • Updated runtime validation and error messages to reflect the uppercase confidence values.
  • Updated toolsnap snapshots, docs, and unit tests to match the new casing.
Show a summary per file
File Description
pkg/github/issues_granular.go Updates tool schemas/descriptions and runtime validation for confidence to uppercase values.
pkg/github/granular_tools_test.go Adjusts tests to send/expect uppercase confidence values and updated error text.
pkg/github/toolsnaps/update_issue_type.snap Updates snapshot schema text/enums to uppercase confidence values.
pkg/github/toolsnaps/update_issue_labels.snap Updates snapshot schema text/enums to uppercase confidence values.
pkg/github/toolsnaps/set_issue_fields.snap Updates snapshot schema text/enums to uppercase confidence values.
docs/feature-flags.md Updates generated feature-flag tool docs to reflect uppercase confidence guidance.

Copilot's findings

  • Files reviewed: 6/6 changed files
  • Comments generated: 3

Comment thread pkg/github/issues_granular.go
Comment thread pkg/github/issues_granular.go
Comment thread pkg/github/issues_granular.go
kelsey-myers
kelsey-myers previously approved these changes Jun 17, 2026
@RossTarrant RossTarrant merged commit 6830c4d into main Jun 17, 2026
19 checks passed
@RossTarrant RossTarrant deleted the reneexeener/fix-confidence-enum branch June 17, 2026 13:50
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.

4 participants