mirror of
https://github.com/stablyai/orca.git
synced 2026-10-27 08:02:51 +00:00
fix(gitlab): paginate TaskPage issues beyond 50 (#13538)
Co-authored-by: Neil <neil@stably.ai>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
)
|
||||
}
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user