Add command to get list of job ids
Problem to solve
When you want to inspect a certain pipeline with glab ci trace or some other command, you have to enter the job number, but when you type glab ci list you get the pipeline number, which is not supported.
Proposal
A new command should be added that gives the list of jobs when passed a Pipeline ID. Maybe something like: glab ci jobs with the default of the most recent pipeline and then you could do glab ci jobs PIPELINE_ID and that would give you a list of jobs for a specific Pipeline.
Further details
-
https://gitlab.com/api/v4/projects/PROJECT_ID/pipelines- this is to get all the pipelines and whatglab ci listis using -
https://gitlab.com/api/v4/projects/PROJECT_ID/pipelines/PIPELINE_ID/job- this gets you all the jobs of a specific pipeline... I think this is the missing piece in the CLI -
https://gitlab.com/api/v4/projects/PROJECT_ID/jobs/JOB_ID/trace- this gives you the trace
Links / references
Edited by Kai Armstrong