Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9a5fe11

Browse files
chore: export code scanning funcs
1 parent973fb5d commit9a5fe11

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

‎pkg/github/code_scanning.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
"github.com/mark3labs/mcp-go/server"
1414
)
1515

16-
funcgetCodeScanningAlert(client*github.Client,t translations.TranslationHelperFunc) (tool mcp.Tool,handler server.ToolHandlerFunc) {
16+
funcGetCodeScanningAlert(client*github.Client,t translations.TranslationHelperFunc) (tool mcp.Tool,handler server.ToolHandlerFunc) {
1717
returnmcp.NewTool("get_code_scanning_alert",
1818
mcp.WithDescription(t("TOOL_GET_CODE_SCANNING_ALERT_DESCRIPTION","Get details of a specific code scanning alert in a GitHub repository.")),
1919
mcp.WithString("owner",
@@ -66,7 +66,7 @@ func getCodeScanningAlert(client *github.Client, t translations.TranslationHelpe
6666
}
6767
}
6868

69-
funclistCodeScanningAlerts(client*github.Client,t translations.TranslationHelperFunc) (tool mcp.Tool,handler server.ToolHandlerFunc) {
69+
funcListCodeScanningAlerts(client*github.Client,t translations.TranslationHelperFunc) (tool mcp.Tool,handler server.ToolHandlerFunc) {
7070
returnmcp.NewTool("list_code_scanning_alerts",
7171
mcp.WithDescription(t("TOOL_LIST_CODE_SCANNING_ALERTS_DESCRIPTION","List code scanning alerts in a GitHub repository.")),
7272
mcp.WithString("owner",

‎pkg/github/code_scanning_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
funcTest_GetCodeScanningAlert(t*testing.T) {
1717
// Verify tool definition once
1818
mockClient:=github.NewClient(nil)
19-
tool,_:=getCodeScanningAlert(mockClient,translations.NullTranslationHelper)
19+
tool,_:=GetCodeScanningAlert(mockClient,translations.NullTranslationHelper)
2020

2121
assert.Equal(t,"get_code_scanning_alert",tool.Name)
2222
assert.NotEmpty(t,tool.Description)
@@ -82,7 +82,7 @@ func Test_GetCodeScanningAlert(t *testing.T) {
8282
t.Run(tc.name,func(t*testing.T) {
8383
// Setup client with mock
8484
client:=github.NewClient(tc.mockedClient)
85-
_,handler:=getCodeScanningAlert(client,translations.NullTranslationHelper)
85+
_,handler:=GetCodeScanningAlert(client,translations.NullTranslationHelper)
8686

8787
// Create call request
8888
request:=createMCPRequest(tc.requestArgs)
@@ -118,7 +118,7 @@ func Test_GetCodeScanningAlert(t *testing.T) {
118118
funcTest_ListCodeScanningAlerts(t*testing.T) {
119119
// Verify tool definition once
120120
mockClient:=github.NewClient(nil)
121-
tool,_:=listCodeScanningAlerts(mockClient,translations.NullTranslationHelper)
121+
tool,_:=ListCodeScanningAlerts(mockClient,translations.NullTranslationHelper)
122122

123123
assert.Equal(t,"list_code_scanning_alerts",tool.Name)
124124
assert.NotEmpty(t,tool.Description)
@@ -201,7 +201,7 @@ func Test_ListCodeScanningAlerts(t *testing.T) {
201201
t.Run(tc.name,func(t*testing.T) {
202202
// Setup client with mock
203203
client:=github.NewClient(tc.mockedClient)
204-
_,handler:=listCodeScanningAlerts(client,translations.NullTranslationHelper)
204+
_,handler:=ListCodeScanningAlerts(client,translations.NullTranslationHelper)
205205

206206
// Create call request
207207
request:=createMCPRequest(tc.requestArgs)

‎pkg/github/server.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ func NewServer(client *github.Client, version string, readOnly bool, t translati
7575
s.AddTool(getMe(client,t))
7676

7777
// Add GitHub tools - Code Scanning
78-
s.AddTool(getCodeScanningAlert(client,t))
79-
s.AddTool(listCodeScanningAlerts(client,t))
78+
s.AddTool(GetCodeScanningAlert(client,t))
79+
s.AddTool(ListCodeScanningAlerts(client,t))
8080
returns
8181
}
8282

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp