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

Commit519ed9e

Browse files
chore: export remaining search + helpers
1 parent3dae8ab commit519ed9e

File tree

7 files changed

+115
-115
lines changed

7 files changed

+115
-115
lines changed

‎pkg/github/code_scanning.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func GetCodeScanningAlert(client *github.Client, t translations.TranslationHelpe
3838
iferr!=nil {
3939
returnmcp.NewToolResultError(err.Error()),nil
4040
}
41-
alertNumber,err:=requiredInt(request,"alertNumber")
41+
alertNumber,err:=RequiredInt(request,"alertNumber")
4242
iferr!=nil {
4343
returnmcp.NewToolResultError(err.Error()),nil
4444
}
@@ -97,15 +97,15 @@ func ListCodeScanningAlerts(client *github.Client, t translations.TranslationHel
9797
iferr!=nil {
9898
returnmcp.NewToolResultError(err.Error()),nil
9999
}
100-
ref,err:=optionalParam[string](request,"ref")
100+
ref,err:=OptionalParam[string](request,"ref")
101101
iferr!=nil {
102102
returnmcp.NewToolResultError(err.Error()),nil
103103
}
104-
state,err:=optionalParam[string](request,"state")
104+
state,err:=OptionalParam[string](request,"state")
105105
iferr!=nil {
106106
returnmcp.NewToolResultError(err.Error()),nil
107107
}
108-
severity,err:=optionalParam[string](request,"severity")
108+
severity,err:=OptionalParam[string](request,"severity")
109109
iferr!=nil {
110110
returnmcp.NewToolResultError(err.Error()),nil
111111
}

‎pkg/github/issues.go

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func GetIssue(client *github.Client, t translations.TranslationHelperFunc) (tool
4040
iferr!=nil {
4141
returnmcp.NewToolResultError(err.Error()),nil
4242
}
43-
issueNumber,err:=requiredInt(request,"issue_number")
43+
issueNumber,err:=RequiredInt(request,"issue_number")
4444
iferr!=nil {
4545
returnmcp.NewToolResultError(err.Error()),nil
4646
}
@@ -98,7 +98,7 @@ func AddIssueComment(client *github.Client, t translations.TranslationHelperFunc
9898
iferr!=nil {
9999
returnmcp.NewToolResultError(err.Error()),nil
100100
}
101-
issueNumber,err:=requiredInt(request,"issue_number")
101+
issueNumber,err:=RequiredInt(request,"issue_number")
102102
iferr!=nil {
103103
returnmcp.NewToolResultError(err.Error()),nil
104104
}
@@ -162,22 +162,22 @@ func SearchIssues(client *github.Client, t translations.TranslationHelperFunc) (
162162
mcp.Description("Sort order ('asc' or 'desc')"),
163163
mcp.Enum("asc","desc"),
164164
),
165-
withPagination(),
165+
WithPagination(),
166166
),
167167
func(ctx context.Context,request mcp.CallToolRequest) (*mcp.CallToolResult,error) {
168168
query,err:=requiredParam[string](request,"q")
169169
iferr!=nil {
170170
returnmcp.NewToolResultError(err.Error()),nil
171171
}
172-
sort,err:=optionalParam[string](request,"sort")
172+
sort,err:=OptionalParam[string](request,"sort")
173173
iferr!=nil {
174174
returnmcp.NewToolResultError(err.Error()),nil
175175
}
176-
order,err:=optionalParam[string](request,"order")
176+
order,err:=OptionalParam[string](request,"order")
177177
iferr!=nil {
178178
returnmcp.NewToolResultError(err.Error()),nil
179179
}
180-
pagination,err:=optionalPaginationParams(request)
180+
pagination,err:=OptionalPaginationParams(request)
181181
iferr!=nil {
182182
returnmcp.NewToolResultError(err.Error()),nil
183183
}
@@ -268,25 +268,25 @@ func CreateIssue(client *github.Client, t translations.TranslationHelperFunc) (t
268268
}
269269

270270
// Optional parameters
271-
body,err:=optionalParam[string](request,"body")
271+
body,err:=OptionalParam[string](request,"body")
272272
iferr!=nil {
273273
returnmcp.NewToolResultError(err.Error()),nil
274274
}
275275

276276
// Get assignees
277-
assignees,err:=optionalStringArrayParam(request,"assignees")
277+
assignees,err:=OptionalStringArrayParam(request,"assignees")
278278
iferr!=nil {
279279
returnmcp.NewToolResultError(err.Error()),nil
280280
}
281281

282282
// Get labels
283-
labels,err:=optionalStringArrayParam(request,"labels")
283+
labels,err:=OptionalStringArrayParam(request,"labels")
284284
iferr!=nil {
285285
returnmcp.NewToolResultError(err.Error()),nil
286286
}
287287

288288
// Get optional milestone
289-
milestone,err:=optionalIntParam(request,"milestone")
289+
milestone,err:=OptionalIntParam(request,"milestone")
290290
iferr!=nil {
291291
returnmcp.NewToolResultError(err.Error()),nil
292292
}
@@ -363,7 +363,7 @@ func ListIssues(client *github.Client, t translations.TranslationHelperFunc) (to
363363
mcp.WithString("since",
364364
mcp.Description("Filter by date (ISO 8601 timestamp)"),
365365
),
366-
withPagination(),
366+
WithPagination(),
367367
),
368368
func(ctx context.Context,request mcp.CallToolRequest) (*mcp.CallToolResult,error) {
369369
owner,err:=requiredParam[string](request,"owner")
@@ -378,28 +378,28 @@ func ListIssues(client *github.Client, t translations.TranslationHelperFunc) (to
378378
opts:=&github.IssueListByRepoOptions{}
379379

380380
// Set optional parameters if provided
381-
opts.State,err=optionalParam[string](request,"state")
381+
opts.State,err=OptionalParam[string](request,"state")
382382
iferr!=nil {
383383
returnmcp.NewToolResultError(err.Error()),nil
384384
}
385385

386386
// Get labels
387-
opts.Labels,err=optionalStringArrayParam(request,"labels")
387+
opts.Labels,err=OptionalStringArrayParam(request,"labels")
388388
iferr!=nil {
389389
returnmcp.NewToolResultError(err.Error()),nil
390390
}
391391

392-
opts.Sort,err=optionalParam[string](request,"sort")
392+
opts.Sort,err=OptionalParam[string](request,"sort")
393393
iferr!=nil {
394394
returnmcp.NewToolResultError(err.Error()),nil
395395
}
396396

397-
opts.Direction,err=optionalParam[string](request,"direction")
397+
opts.Direction,err=OptionalParam[string](request,"direction")
398398
iferr!=nil {
399399
returnmcp.NewToolResultError(err.Error()),nil
400400
}
401401

402-
since,err:=optionalParam[string](request,"since")
402+
since,err:=OptionalParam[string](request,"since")
403403
iferr!=nil {
404404
returnmcp.NewToolResultError(err.Error()),nil
405405
}
@@ -497,7 +497,7 @@ func UpdateIssue(client *github.Client, t translations.TranslationHelperFunc) (t
497497
iferr!=nil {
498498
returnmcp.NewToolResultError(err.Error()),nil
499499
}
500-
issueNumber,err:=requiredInt(request,"issue_number")
500+
issueNumber,err:=RequiredInt(request,"issue_number")
501501
iferr!=nil {
502502
returnmcp.NewToolResultError(err.Error()),nil
503503
}
@@ -506,23 +506,23 @@ func UpdateIssue(client *github.Client, t translations.TranslationHelperFunc) (t
506506
issueRequest:=&github.IssueRequest{}
507507

508508
// Set optional parameters if provided
509-
title,err:=optionalParam[string](request,"title")
509+
title,err:=OptionalParam[string](request,"title")
510510
iferr!=nil {
511511
returnmcp.NewToolResultError(err.Error()),nil
512512
}
513513
iftitle!="" {
514514
issueRequest.Title=github.Ptr(title)
515515
}
516516

517-
body,err:=optionalParam[string](request,"body")
517+
body,err:=OptionalParam[string](request,"body")
518518
iferr!=nil {
519519
returnmcp.NewToolResultError(err.Error()),nil
520520
}
521521
ifbody!="" {
522522
issueRequest.Body=github.Ptr(body)
523523
}
524524

525-
state,err:=optionalParam[string](request,"state")
525+
state,err:=OptionalParam[string](request,"state")
526526
iferr!=nil {
527527
returnmcp.NewToolResultError(err.Error()),nil
528528
}
@@ -531,7 +531,7 @@ func UpdateIssue(client *github.Client, t translations.TranslationHelperFunc) (t
531531
}
532532

533533
// Get labels
534-
labels,err:=optionalStringArrayParam(request,"labels")
534+
labels,err:=OptionalStringArrayParam(request,"labels")
535535
iferr!=nil {
536536
returnmcp.NewToolResultError(err.Error()),nil
537537
}
@@ -540,15 +540,15 @@ func UpdateIssue(client *github.Client, t translations.TranslationHelperFunc) (t
540540
}
541541

542542
// Get assignees
543-
assignees,err:=optionalStringArrayParam(request,"assignees")
543+
assignees,err:=OptionalStringArrayParam(request,"assignees")
544544
iferr!=nil {
545545
returnmcp.NewToolResultError(err.Error()),nil
546546
}
547547
iflen(assignees)>0 {
548548
issueRequest.Assignees=&assignees
549549
}
550550

551-
milestone,err:=optionalIntParam(request,"milestone")
551+
milestone,err:=OptionalIntParam(request,"milestone")
552552
iferr!=nil {
553553
returnmcp.NewToolResultError(err.Error()),nil
554554
}
@@ -612,15 +612,15 @@ func GetIssueComments(client *github.Client, t translations.TranslationHelperFun
612612
iferr!=nil {
613613
returnmcp.NewToolResultError(err.Error()),nil
614614
}
615-
issueNumber,err:=requiredInt(request,"issue_number")
615+
issueNumber,err:=RequiredInt(request,"issue_number")
616616
iferr!=nil {
617617
returnmcp.NewToolResultError(err.Error()),nil
618618
}
619-
page,err:=optionalIntParamWithDefault(request,"page",1)
619+
page,err:=OptionalIntParamWithDefault(request,"page",1)
620620
iferr!=nil {
621621
returnmcp.NewToolResultError(err.Error()),nil
622622
}
623-
perPage,err:=optionalIntParamWithDefault(request,"per_page",30)
623+
perPage,err:=OptionalIntParamWithDefault(request,"per_page",30)
624624
iferr!=nil {
625625
returnmcp.NewToolResultError(err.Error()),nil
626626
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp