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

Add pagination support to GraphQL-based tools#683

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
mattdholloway wants to merge28 commits intomain
base:main
Choose a base branch
Loading
fromadd-pagination-graphql
Open
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
28 commits
Select commitHold shift + click to select a range
2f95120
initial pagination for `ListDiscussions`
mattdhollowayJul 15, 2025
d464ac1
redo category id var cast
mattdhollowayJul 15, 2025
d745f5c
add GraphQL pagination support for discussion comments and categories
mattdhollowayJul 15, 2025
83c0a74
remove pageinfo returns
mattdhollowayJul 15, 2025
f47e554
fix out ref for linter
mattdhollowayJul 15, 2025
c9d6e1f
update docs
mattdhollowayJul 15, 2025
88f1255
Merge branch 'main' into add-pagination-graphql
mattdhollowayJul 15, 2025
9a08648
move to unified pagination for consensus on params
mattdhollowayJul 16, 2025
5c8b4a7
update docs
mattdhollowayJul 16, 2025
6bb5daf
refactor pagination handling
mattdhollowayJul 16, 2025
6d00394
update docs
mattdhollowayJul 16, 2025
d2dd8f2
linter fix
mattdhollowayJul 16, 2025
3cab7b1
conv rest to gql params for safe lint
mattdhollowayJul 16, 2025
f701670
add nolint
mattdhollowayJul 16, 2025
30e01f4
add error handling for perPage value in ToGraphQLParams
mattdhollowayJul 16, 2025
b454926
refactor pagination error handling
mattdhollowayJul 16, 2025
98fd144
unified params for rest andn graphql and rennamed to be uniform for g…
mattdhollowayJul 16, 2025
1099990
add 'after' for pagination
mattdhollowayJul 16, 2025
752499b
update docs
mattdhollowayJul 16, 2025
548d4d7
Update pkg/github/discussions.go
mattdhollowayJul 17, 2025
592940e
Update pkg/github/discussions.go
mattdhollowayJul 17, 2025
b09612e
Update pkg/github/discussions_test.go
mattdhollowayJul 17, 2025
e21635c
update default page size const
mattdhollowayJul 17, 2025
2d36b04
Merge branch 'main' into add-pagination-graphql
mattdhollowayJul 17, 2025
985f8b2
reduce default pagination size from 100 to 30 in discussion tests
mattdhollowayJul 17, 2025
5d795ec
update pagination for reverse and total
mattdhollowayJul 17, 2025
7877d8d
update pagination to remove from discussions
mattdhollowayJul 18, 2025
f870807
updated README
mattdhollowayJul 18, 2025
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
8 changes: 4 additions & 4 deletionsREADME.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -581,21 +581,21 @@ export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description
- `repo`: Repository name (string, required)

- **get_discussion_comments** - Get discussion comments
- `after`: Cursor for pagination. Use the endCursor from the previous page's PageInfo for GraphQL APIs. (string, optional)
- `discussionNumber`: Discussion Number (number, required)
- `owner`: Repository owner (string, required)
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
- `repo`: Repository name (string, required)

- **list_discussion_categories** - List discussion categories
- `after`: Cursor for pagination, use the 'after' field from the previous response (string, optional)
- `before`: Cursor for pagination, use the 'before' field from the previous response (string, optional)
- `first`: Number of categories to return per page (min 1, max 100) (number, optional)
- `last`: Number of categories to return from the end (min 1, max 100) (number, optional)
- `owner`: Repository owner (string, required)
- `repo`: Repository name (string, required)

- **list_discussions** - List discussions
- `after`: Cursor for pagination. Use the endCursor from the previous page's PageInfo for GraphQL APIs. (string, optional)
- `category`: Optional filter by discussion category ID. If provided, only discussions with this category are listed. (string, optional)
- `owner`: Repository owner (string, required)
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
- `repo`: Repository name (string, required)

</details>
Expand Down
16 changes: 8 additions & 8 deletionspkg/github/actions.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -62,8 +62,8 @@ func ListWorkflows(getClient GetClientFn, t translations.TranslationHelperFunc)

// Set up list options
opts := &github.ListOptions{
PerPage: pagination.perPage,
Page: pagination.page,
PerPage: pagination.PerPage,
Page: pagination.Page,
}

workflows, resp, err := client.Actions.ListWorkflows(ctx, owner, repo, opts)
Expand DownExpand Up@@ -200,8 +200,8 @@ func ListWorkflowRuns(getClient GetClientFn, t translations.TranslationHelperFun
Event: event,
Status: status,
ListOptions: github.ListOptions{
PerPage: pagination.perPage,
Page: pagination.page,
PerPage: pagination.PerPage,
Page: pagination.Page,
},
}

Expand DownExpand Up@@ -503,8 +503,8 @@ func ListWorkflowJobs(getClient GetClientFn, t translations.TranslationHelperFun
opts := &github.ListWorkflowJobsOptions{
Filter: filter,
ListOptions: github.ListOptions{
PerPage: pagination.perPage,
Page: pagination.page,
PerPage: pagination.PerPage,
Page: pagination.Page,
},
}

Expand DownExpand Up@@ -1025,8 +1025,8 @@ func ListWorkflowRunArtifacts(getClient GetClientFn, t translations.TranslationH

// Set up list options
opts := &github.ListOptions{
PerPage: pagination.perPage,
Page: pagination.page,
PerPage: pagination.PerPage,
Page: pagination.Page,
}

artifacts, resp, err := client.Actions.ListWorkflowRunArtifacts(ctx, owner, repo, runID, opts)
Expand Down
Loading
Loading

[8]ページ先頭

©2009-2025 Movatter.jp