Skip to content

Commit 8b13ebb

Browse files
committed
add tool name resource for list code scanning alerts tool
1 parent 62eed34 commit 8b13ebb

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,7 @@ export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description
436436
- `ref`: Git reference (string, optional)
437437
- `state`: Alert state (string, optional)
438438
- `severity`: Alert severity (string, optional)
439+
- `tool_name`: The name of the tool used for code scanning (string, optional)
439440

440441
## Resources
441442

main

6.09 MB
Binary file not shown.

pkg/github/code_scanning_test.go

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ func Test_ListCodeScanningAlerts(t *testing.T) {
127127
assert.Contains(t, tool.InputSchema.Properties, "ref")
128128
assert.Contains(t, tool.InputSchema.Properties, "state")
129129
assert.Contains(t, tool.InputSchema.Properties, "severity")
130+
assert.Contains(t, tool.InputSchema.Properties, "tool_name")
130131
assert.ElementsMatch(t, tool.InputSchema.Required, []string{"owner", "repo"})
131132

132133
// Setup mock alerts for success case
@@ -159,20 +160,22 @@ func Test_ListCodeScanningAlerts(t *testing.T) {
159160
mock.WithRequestMatchHandler(
160161
mock.GetReposCodeScanningAlertsByOwnerByRepo,
161162
expectQueryParams(t, map[string]string{
162-
"ref": "main",
163-
"state": "open",
164-
"severity": "high",
163+
"ref": "main",
164+
"state": "open",
165+
"severity": "high",
166+
"tool_name": "CodeQL",
165167
}).andThen(
166168
mockResponse(t, http.StatusOK, mockAlerts),
167169
),
168170
),
169171
),
170172
requestArgs: map[string]interface{}{
171-
"owner": "owner",
172-
"repo": "repo",
173-
"ref": "main",
174-
"state": "open",
175-
"severity": "high",
173+
"owner": "owner",
174+
"repo": "repo",
175+
"ref": "main",
176+
"state": "open",
177+
"severity": "high",
178+
"tool_name": "CodeQL",
176179
},
177180
expectError: false,
178181
expectedAlerts: mockAlerts,

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