Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions pkg/github/issues_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -468,9 +468,10 @@
),
),
requestArgs: map[string]interface{}{
"owner": "owner",

Check failure on line 471 in pkg/github/issues_test.go

View workflow job for this annotation

GitHub Actions / lint

File is not properly formatted (gofmt)

Check failure on line 471 in pkg/github/issues_test.go

View workflow job for this annotation

GitHub Actions / lint

File is not properly formatted (gofmt)
"repo": "repo",
"title": "Minimal Issue",
"assignees": nil, // Expect no failure with nil optional value.
},
expectError: false,
expectedIssue: &github.Issue{
Expand Down
6 changes: 4 additions & 2 deletions pkg/github/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,12 +232,14 @@
// 1. Checks if the parameter is present in the request, if not, it returns its zero-value
// 2. If it is present, iterates the elements and checks each is a string
func OptionalStringArrayParam(r mcp.CallToolRequest, p string) ([]string, error) {
// Check if the parameter is present in the request
// Check if the parameter is present in the request

Check failure on line 235 in pkg/github/server.go

View workflow job for this annotation

GitHub Actions / lint

File is not properly formatted (gofmt)

Check failure on line 235 in pkg/github/server.go

View workflow job for this annotation

GitHub Actions / lint

File is not properly formatted (gofmt)
if _, ok := r.Params.Arguments[p]; !ok {
return []string{}, nil
}

switch v := r.Params.Arguments[p].(type) {
switch v := r.Params.Arguments[p].(type) {
case nil:
return []string{}, nil
case []string:
return v, nil
case []any:
Expand Down
Loading