Kesin11/actions-timeline

Support pagination in `listJobsForWorkflowRunAttempt`

ben-z opened this issue · 5 comments

ben-z commented

I recently started experimenting with this project, but I'm observing that only around 30 out of my 61 jobs are shown in the resulting gantt chart. It appears that the default page size is 30: https://docs.github.com/en/rest/actions/workflow-jobs?apiVersion=2022-11-28#list-jobs-for-a-workflow-run-attempt. Could you support pagination?

@ben-z
Thanks for trying actions-timeline!
It seems List jobs for a workflow run attempt parameter per_page can accept max to 100.
I think almost use case are enough to handle 100 jobs, so I will use this parameter instead of pagination.

@ben-z
I released v2.0.1
Please try it.

ben-z commented

@ben-z I released v2.0.1 Please try it.

Works well! Thanks for the update

ben-z commented

Just came across some pagination code from another repo, it's a good reference in case we want to implement it here.

https://github.com/inception-health/otel-export-trace-action/blob/b70e5a1e4cc4764bbbaeb963f8952b8d3d1529ba/src/github.ts#L182-L205

@ben-z
Thanks!
But we also need to consider the size limit for mermaid. Even if we could get all the jobs in the workflow, we may not be able to render them due to mermaid errors.