fix(gitlab): paginate TaskPage issues beyond 50 (#13538)

Co-authored-by: Neil <neil@stably.ai>
This commit is contained in:
BingZ
2026-08-28 02:25:48 -07:00
committed by GitHub
co-authored by Neil
parent 83320bff9e
commit caef20fec8
21 changed files with 467 additions and 69 deletions
+13 -4
View File
@@ -64,7 +64,8 @@ describe('gitlab RPC methods', () => {
repo: 'id:repo-1',
state: 'opened',
assignee: '@me',
limit: 50
limit: 50,
page: 2
})
)
await dispatcher.dispatch(
@@ -202,7 +203,7 @@ describe('gitlab RPC methods', () => {
25,
'bug'
)
expect(runtime.listGitLabRepoIssues).toHaveBeenCalledWith('id:repo-1', 'opened', '@me', 50)
expect(runtime.listGitLabRepoIssues).toHaveBeenCalledWith('id:repo-1', 'opened', '@me', 50, 2)
expect(runtime.createGitLabRepoIssue).toHaveBeenCalledWith('id:repo-1', 'Fix bug', 'Details')
expect(runtime.listGitLabRepoTodos).toHaveBeenCalledWith('id:repo-1')
expect(runtime.listGitLabRepoLabels).toHaveBeenCalledWith('id:repo-1')
@@ -309,9 +310,17 @@ describe('gitlab RPC methods', () => {
'id:repo-1',
'closed',
undefined,
100
100,
1
)
expect(runtime.listGitLabRepoIssues).toHaveBeenNthCalledWith(
2,
'id:repo-1',
'opened',
'@me',
1,
1
)
expect(runtime.listGitLabRepoIssues).toHaveBeenNthCalledWith(2, 'id:repo-1', 'opened', '@me', 1)
})
// Regression for #7732: the WS/relay transports close the connection on frames
+4 -2
View File
@@ -36,7 +36,8 @@ const WorkItemsList = RepoSelector.extend({
const IssuesList = RepoSelector.extend({
state: z.unknown().optional(),
assignee: OptionalString,
limit: OptionalFiniteNumber
limit: OptionalFiniteNumber,
page: OptionalFiniteNumber
})
const CreateIssue = RepoSelector.extend({
@@ -182,7 +183,8 @@ export const GITLAB_METHODS: RpcMethod[] = [
params.repo,
normalized.state,
normalized.assignee,
normalized.limit
normalized.limit,
normalized.page
)
}
}),