Skip to content

Add Tool Name property for List Code Scanning Alerts tool #272

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 8 commits into from
Apr 15, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rename variable tool_name to toolName
  • Loading branch information
Dylan-Rinker authored Apr 14, 2025
commit 6278199d8e68f1ea553c91ca50d7f7688d62f30f
4 changes: 2 additions & 2 deletions pkg/github/code_scanning.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func ListCodeScanningAlerts(getClient GetClientFn, t translations.TranslationHel
if err != nil {
return mcp.NewToolResultError(err.Error()), nil
}
tool_name, err := OptionalParam[string](request, "tool_name")
toolName, err := OptionalParam[string](request, "tool_name")
if err != nil {
return mcp.NewToolResultError(err.Error()), nil
}
Expand All @@ -126,7 +126,7 @@ func ListCodeScanningAlerts(getClient GetClientFn, t translations.TranslationHel
if err != nil {
return nil, fmt.Errorf("failed to get GitHub client: %w", err)
}
alerts, resp, err := client.CodeScanning.ListAlertsForRepo(ctx, owner, repo, &github.AlertListOptions{Ref: ref, State: state, Severity: severity, ToolName: tool_name})
alerts, resp, err := client.CodeScanning.ListAlertsForRepo(ctx, owner, repo, &github.AlertListOptions{Ref: ref, State: state, Severity: severity, ToolName: toolName})
if err != nil {
return nil, fmt.Errorf("failed to list alerts: %w", err)
}
Expand Down