Skip to content

Add tool for getting code quality findings#2604

Merged
SamMorrowDrums merged 2 commits into
mainfrom
koesie10/get-code-quality-finding
Jun 17, 2026
Merged

Add tool for getting code quality findings#2604
SamMorrowDrums merged 2 commits into
mainfrom
koesie10/get-code-quality-finding

Conversation

@koesie10

@koesie10 koesie10 commented Jun 4, 2026

Copy link
Copy Markdown
Member

Summary

This adds a new tool to get a single code quality finding by its finding number. It returns the response that the REST API returns.

Why

See internal linked issue. This will allow Copilot to retrieve and fix Code Quality findings

What changed

  • Adds a new get_code_quality_finding tool and runs the various scripts to update the docs/retrieve icon
  • Adds a new code_quality toolset that contains the tool

MCP impact

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

Prompts tested (tool changes only)

  • See internal linked issue for the full evaluation, these include:
  • "How should I resolve code quality finding 314 for monalisa/smile?"
  • "What is the title of code quality finding 29 in monalisa/smile?"
  • "What file is code quality finding 29 about in monalisa/smile?"
  • "Tell me about code quality finding 29 in monalisa/smile"
  • "How severe is code quality finding 29 in monalisa/smile?"

Security / limits

  • No security or limits impact
  • Auth / permissions considered: The REST API is accessible using the repo scope.
  • 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)

@advancedresearcharray

Copy link
Copy Markdown

This branch is 2 commits behind main (#2600, #2605), which is why the merge status shows BEHIND.

I rebased the branch onto current main locally. The rebased commit is available on fork branch advancedresearcharray/github-mcp-server@koesie10/get-code-quality-finding (a216cc4).

@koesie10 — to update this PR's branch:

git fetch https://github.com/advancedresearcharray/github-mcp-server.git koesie10/get-code-quality-finding
git push origin FETCH_HEAD:koesie10/get-code-quality-finding --force-with-lease

CI was already green on the original commit; no review comments to address. The implementation looks good — follows the same pattern as get_code_scanning_alert, uses raw REST since the Code Quality API isn't in go-github yet, and includes tests with tool snaps.

@advancedresearcharray

Copy link
Copy Markdown

Opened rebased PR #2616 targeting main directly — ready for maintainer review and merge.

@advancedresearcharray

Copy link
Copy Markdown

Opened #2617 to rebase this branch onto latest main (same approach as #2613 for #2608). Merging #2617 will update this PR's branch.

@norascheuch norascheuch marked this pull request as ready for review June 16, 2026 13:11
@norascheuch norascheuch requested a review from a team as a code owner June 16, 2026 13:11
Copilot AI review requested due to automatic review settings June 16, 2026 13:11

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

Adds first-class support for GitHub “Code Quality” findings to the MCP server by introducing a new read-only tool and grouping it under a dedicated code_quality toolset (including icon + docs/snapshots).

Changes:

  • Added get_code_quality_finding tool to fetch a single code quality finding by number via the REST API.
  • Introduced the code_quality toolset metadata (with Octicon support) and registered the tool in the server tool inventory.
  • Updated tool snapshots and generated documentation (README + docs pages) to include the new tool/toolset.
Show a summary per file
File Description
README.md Documents the new code_quality toolset and the get_code_quality_finding tool parameters/scopes.
pkg/octicons/required_icons.txt Adds the code-square icon to the required Octicons list.
pkg/github/tools.go Defines ToolsetMetadataCodeQuality and registers GetCodeQualityFinding in AllTools.
pkg/github/helper_test.go Adds a mock route constant for the new code-quality findings endpoint.
pkg/github/code_quality.go Implements get_code_quality_finding tool handler using the REST endpoint.
pkg/github/code_quality_test.go Adds snapshot + behavioral tests for the new tool.
pkg/github/toolsnaps/get_code_quality_finding.snap Adds the tool schema snapshot for CI toolsnap validation.
docs/toolsets-and-icons.md Documents the new Code Quality toolset icon mapping.
docs/remote-server.md Adds the code_quality toolset to the remote server toolset list.
docs/feature-flags.md Updates generated docs content for reviewer description text.

Copilot's findings

  • Files reviewed: 10/12 changed files
  • Comments generated: 1

Comment thread docs/feature-flags.md

@SamMorrowDrums SamMorrowDrums left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks great, just giving it a final look.

@SamMorrowDrums SamMorrowDrums merged commit f9a4dc5 into main Jun 17, 2026
19 checks passed
@SamMorrowDrums SamMorrowDrums deleted the koesie10/get-code-quality-finding branch June 17, 2026 10:19
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.

5 participants