Skip to content

Commit 32d7809

Browse files
committed
Remove unused per_page
1 parent b24bcd9 commit 32d7809

File tree

4 files changed

+0
-16
lines changed

4 files changed

+0
-16
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,6 @@ The following sets of tools are available (all are on by default):
667667
- `field_id`: The field's id. (number, required)
668668
- `owner`: If owner_type == user it is the handle for the GitHub user account. If owner_type == org it is the name of the organization. The name is not case sensitive. (string, required)
669669
- `owner_type`: Owner type (string, required)
670-
- `per_page`: Number of results per page (max 100, default: 30) (number, optional)
671670
- `project_number`: The project's number. (number, required)
672671

673672
- **get_project_item** - Get project item

pkg/github/__toolsnaps__/get_project_field.snap

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@
2222
],
2323
"type": "string"
2424
},
25-
"per_page": {
26-
"description": "Number of results per page (max 100, default: 30)",
27-
"type": "number"
28-
},
2925
"project_number": {
3026
"description": "The project's number.",
3127
"type": "number"

pkg/github/projects.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,6 @@ func GetProjectField(getClient GetClientFn, t translations.TranslationHelperFunc
255255
mcp.WithString("owner", mcp.Required(), mcp.Description("If owner_type == user it is the handle for the GitHub user account. If owner_type == org it is the name of the organization. The name is not case sensitive.")),
256256
mcp.WithNumber("project_number", mcp.Required(), mcp.Description("The project's number.")),
257257
mcp.WithNumber("field_id", mcp.Required(), mcp.Description("The field's id.")),
258-
mcp.WithNumber("per_page", mcp.Description("Number of results per page (max 100, default: 30)")),
259258
), func(ctx context.Context, req mcp.CallToolRequest) (*mcp.CallToolResult, error) {
260259
owner, err := RequiredParam[string](req, "owner")
261260
if err != nil {
@@ -273,10 +272,6 @@ func GetProjectField(getClient GetClientFn, t translations.TranslationHelperFunc
273272
if err != nil {
274273
return mcp.NewToolResultError(err.Error()), nil
275274
}
276-
perPage, err := OptionalIntParamWithDefault(req, "per_page", 30)
277-
if err != nil {
278-
return mcp.NewToolResultError(err.Error()), nil
279-
}
280275
client, err := getClient(ctx)
281276
if err != nil {
282277
return mcp.NewToolResultError(err.Error()), nil
@@ -289,11 +284,6 @@ func GetProjectField(getClient GetClientFn, t translations.TranslationHelperFunc
289284
url = fmt.Sprintf("users/%s/projectsV2/%d/fields/%d", owner, projectNumber, fieldID)
290285
}
291286

292-
opts := listProjectsOptions{PerPage: perPage}
293-
url, err = addOptions(url, opts)
294-
if err != nil {
295-
return nil, fmt.Errorf("failed to add options to request: %w", err)
296-
}
297287
projectField := projectV2Field{}
298288

299289
httpRequest, err := client.NewRequest("GET", url, nil)

pkg/github/projects_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,6 @@ func Test_GetProjectField(t *testing.T) {
451451
assert.Contains(t, tool.InputSchema.Properties, "owner")
452452
assert.Contains(t, tool.InputSchema.Properties, "project_number")
453453
assert.Contains(t, tool.InputSchema.Properties, "field_id")
454-
assert.Contains(t, tool.InputSchema.Properties, "per_page")
455454
assert.ElementsMatch(t, tool.InputSchema.Required, []string{"owner_type", "owner", "project_number", "field_id"})
456455

457456
orgField := map[string]any{"id": 101, "name": "Status", "dataType": "single_select"}

0 commit comments

Comments
 (0)