Skip to content

feat: add basic code scanning methods #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 14, 2025
Merged

Conversation

SamMorrowDrums
Copy link
Collaborator

Adds get_code_scanning_alert and list_code_scanning_alerts.

Examples:

echo '{"jsonrpc":"2.0","id":3,"params":{"name":"get_code_scanning_alert", "arguments": {"repo": "turboscan", "owner": "github", "alert_number": 773}},"method":"tools/call"}' | go run  cmd/server/main.go stdio  | jq .


GitHub MCP Server running on stdio
{
  "jsonrpc": "2.0",
  "id": 3,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"number\":773,\"rule\":{\"id\":\"errcheck\",\"severity\":\"error\",\"description\": ...
      }
    ]
  }
}
echo '{"jsonrpc":"2.0","id":3,"params":{"name":"list_code_scanning_alerts", "arguments": {"repo": "turboscan", "owner": "github"}},"method":"tools/call"}' | go run  cmd/server/main.go stdio  | jq .


GitHub MCP Server running on stdio
{
  "jsonrpc": "2.0",
  "id": 3,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "[{\"number\":773,\"rule\":{\"id\":\"errcheck\",\"severity\":\"error\",\"description...}]"
      }
    ]
  }
}


@Copilot Copilot AI review requested due to automatic review settings March 14, 2025 16:15
Copy link
Contributor

@Copilot 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 adds two new tools to retrieve code scanning alerts from a GitHub repository.

  • Introduces getCodeScanningAlert and listCodeScanningAlerts functions in pkg/github/code_scanning.go.
  • Updates README.md to include documentation for the new code scanning endpoints.
  • Integrates the new code scanning tools in pkg/github/server.go.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
pkg/github/code_scanning.go New functions to retrieve and list code scanning alerts.
README.md Added documentation for the new code scanning tools.
pkg/github/server.go Registers the new code scanning tools to the server.

Tip: Copilot only keeps its highest confidence comments to reduce noise and keep you focused. Learn more

@SamMorrowDrums SamMorrowDrums merged commit 81cc812 into main Mar 14, 2025
3 checks passed
@SamMorrowDrums SamMorrowDrums deleted the support-code-scanning branch March 14, 2025 16:45
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.

1 participant