Personal Telegram developer console for GitHub
feat: page GitHub workflow runs
davoodmehraban89 committed
Oct 3, 2026 at 08:15 UTC
9d4c4094a014a2cdf3250e5b708d7c4156f82a2c
1 file changed
+3
-2
src/github.js
+3
-2
@@ -271,11 +271,12 @@ export class GitHubService {
271
};
272
}
273
274
- async listWorkflowRuns(repoRef, { perPage = 10 } = {}) {
274
+ async listWorkflowRuns(repoRef, { perPage = 10, page = 1 } = {}) {
275
const count = Math.max(1, Math.min(20, Number(perPage) || 10));
276
+ const pageNumber = Math.max(1, Math.min(100, Number(page) || 1));
277
const { apiBase } = await this.getRepositoryContext(repoRef);
278
const data = await this.requestJson(
278
- `${apiBase}/actions/runs?per_page=${count}`,
279
+ `${apiBase}/actions/runs?per_page=${count}&page=${pageNumber}`,
280
'GitHub workflow runs'
281
);
282
return (data.workflow_runs || []).map(run => this.mapWorkflowRun(run));