Skip to content

Commit 4ce42b2

Browse files
committed
add actual changes
1 parent 8b13ebb commit 4ce42b2

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

pkg/github/code_scanning.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ func ListCodeScanningAlerts(getClient GetClientFn, t translations.TranslationHel
9292
mcp.WithString("severity",
9393
mcp.Description("Only code scanning alerts with this severity will be returned. Possible values are: critical, high, medium, low, warning, note, error."),
9494
),
95+
mcp.WithString("tool_name",
96+
mcp.Description("The name of the tool used for code scanning."),
97+
),
9598
),
9699
func(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) {
97100
owner, err := requiredParam[string](request, "owner")
@@ -114,12 +117,16 @@ func ListCodeScanningAlerts(getClient GetClientFn, t translations.TranslationHel
114117
if err != nil {
115118
return mcp.NewToolResultError(err.Error()), nil
116119
}
120+
tool_name, err := OptionalParam[string](request, "tool_name")
121+
if err != nil {
122+
return mcp.NewToolResultError(err.Error()), nil
123+
}
117124

118125
client, err := getClient(ctx)
119126
if err != nil {
120127
return nil, fmt.Errorf("failed to get GitHub client: %w", err)
121128
}
122-
alerts, resp, err := client.CodeScanning.ListAlertsForRepo(ctx, owner, repo, &github.AlertListOptions{Ref: ref, State: state, Severity: severity})
129+
alerts, resp, err := client.CodeScanning.ListAlertsForRepo(ctx, owner, repo, &github.AlertListOptions{Ref: ref, State: state, Severity: severity, ToolName: tool_name})
123130
if err != nil {
124131
return nil, fmt.Errorf("failed to list alerts: %w", err)
125132
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy