Skip to content

Include the pipeline ID for jobs shown in response to list commit status (/projects/:id/repository/commits/:sha/statuses)

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Release notes

Problem to solve

As a developer, I want to be able to identify which pipeline each job shown in the response to /projects/:id/repository/commits/:sha/statuses is associated with.

The response to that API call includes the ID of each job but does not include the corresponding pipeline ID. In order to get the pipeline ID, a second API call is required.

Intended users

User experience goal

The user should be able to be able to identify the pipeline ID of a job reported back when they list the statuses of a commit.

Proposal

The response to the list commit status API includes job IDs but does not include information about which pipeline that job belongs to.

Proposal: let's update the response to include the ID of the pipeline that the job is associated with.

Further details

Imagine you are looking for a way to determine which pipeline a job is associated with when inspecting the response to an API call like:

https://gitlab.com/api/v4/projects/:id/repository/commits/:sha/statuses

The response includes about each job in each pipeline that ran based on the commit with the SHA provided. That response includes the job's id but not the ID of the pipeline that the job runs in. In order to get the pipeline ID, you make a second API call like the following where you supply the job ID from the call above:

https://gitlab.com/api/v4/projects/:id/jobs/:jobid

Based on that response, you can determine the ID of the pipeline that this job ran in.

Docs:

Permissions and Security

Because this is an extension of existing functionality, I would propose no changes with regard to permissions be made. People who have access to GET via the commit status API would see the additional information about the pipeline ID when looking at the list of jobs sent in response to this API request.

Documentation

  • The example response for "List the statuses of a commit" should be updated to reflect this addition.

Availability & Testing

What does success look like, and how can we measure that?

Success means that the pipeline ID can be directly retrieved from the jobs shown in the response to /projects/:id/repository/commits/:sha/statuses.

What is the type of buyer?

Is this a cross-stage feature?

Links / references

Edited by 🤖 GitLab Bot 🤖