Skip to content

Commit 67bba19

Browse files
committed
pr feedback
1 parent 00603c0 commit 67bba19

File tree

1 file changed

+10
-17
lines changed

1 file changed

+10
-17
lines changed

pkg/github/projects.go

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,11 @@ func ListProjects(getClient GetClientFn, t translations.TranslationHelperFunc) (
7676
projects := []github.ProjectV2{}
7777
minimalProjects := []MinimalProject{}
7878

79-
opts := listProjectsOptions{}
80-
opts.PerPage = perPage
81-
82-
if queryStr != "" {
83-
opts.Query = queryStr
79+
opts := listProjectsOptions{
80+
paginationOptions: paginationOptions{PerPage: perPage},
81+
filterQueryOptions: filterQueryOptions{Query: queryStr},
8482
}
83+
8584
url, err = addOptions(url, opts)
8685
if err != nil {
8786
return nil, fmt.Errorf("failed to add options to request: %w", err)
@@ -258,8 +257,7 @@ func ListProjectFields(getClient GetClientFn, t translations.TranslationHelperFu
258257
}
259258
projectFields := []projectV2Field{}
260259

261-
opts := paginationOptions{}
262-
opts.PerPage = perPage
260+
opts := paginationOptions{PerPage: perPage}
263261

264262
url, err = addOptions(url, opts)
265263
if err != nil {
@@ -448,15 +446,10 @@ func ListProjectItems(getClient GetClientFn, t translations.TranslationHelperFun
448446
}
449447
projectItems := []projectV2Item{}
450448

451-
opts := listProjectItemsOptions{}
452-
opts.PerPage = perPage
453-
454-
if queryStr != "" {
455-
opts.Query = queryStr
456-
}
457-
458-
if len(fields) > 0 {
459-
opts.Fields = fields
449+
opts := listProjectItemsOptions{
450+
paginationOptions: paginationOptions{PerPage: perPage},
451+
filterQueryOptions: filterQueryOptions{Query: queryStr},
452+
fieldSelectionOptions: fieldSelectionOptions{Fields: fields},
460453
}
461454

462455
url, err = addOptions(url, opts)
@@ -1034,7 +1027,7 @@ func ManageProjectItemsPrompt(t translations.TranslationHelperFunc) (tool mcp.Pr
10341027
messages := []mcp.PromptMessage{
10351028
{
10361029
Role: "user",
1037-
Content: mcp.NewTextContent("You are an assistant helping users work with GitHub Projects (Projects V2). Your role is to help them discover projects, understand project fields, query items, and update field values on project items."),
1030+
Content: mcp.NewTextContent("You are an assistant helping users work with GitHub Projects V2. Your role is to help them discover projects, understand project fields, query items, and update field values on project items."),
10381031
},
10391032
{
10401033
Role: "user",

0 commit comments

Comments
 (0)