feat(tasks): server-side scope filtering, pagination, and draft bug fix (#1135)
Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
||||
getRepoSlug,
|
||||
listIssues,
|
||||
listWorkItems,
|
||||
countWorkItems,
|
||||
getWorkItem,
|
||||
createIssue,
|
||||
updateIssue,
|
||||
@@ -76,12 +77,17 @@ export function registerGitHubHandlers(store: Store, stats: StatsCollector): voi
|
||||
|
||||
ipcMain.handle(
|
||||
'gh:listWorkItems',
|
||||
(_event, args: { repoPath: string; limit?: number; query?: string }) => {
|
||||
(_event, args: { repoPath: string; limit?: number; query?: string; before?: string }) => {
|
||||
const repo = assertRegisteredRepo(args.repoPath, store)
|
||||
return listWorkItems(repo.path, args.limit, args.query)
|
||||
return listWorkItems(repo.path, args.limit, args.query, args.before)
|
||||
}
|
||||
)
|
||||
|
||||
ipcMain.handle('gh:countWorkItems', (_event, args: { repoPath: string; query?: string }) => {
|
||||
const repo = assertRegisteredRepo(args.repoPath, store)
|
||||
return countWorkItems(repo.path, args.query)
|
||||
})
|
||||
|
||||
ipcMain.handle('gh:workItem', (_event, args: { repoPath: string; number: number }) => {
|
||||
const repo = assertRegisteredRepo(args.repoPath, store)
|
||||
return getWorkItem(repo.path, args.number)
|
||||
|
||||
Reference in New Issue
Block a user