CI Lint API add include_jobs fields to response
Problem to solve
The CI lint UI option within each project's CI/CD pipeline page has a jobs field in the response. However, the CI lint APIs do not expose the jobs field in their response. This would help users see what pipeline jobs run for a given project via API in a dry run scenario.
Proposal
The proposal is to include a parameter (include_jobs) in the APIs to have the option to return the jobs field in the response.
Further Details
The UI and API methods for CI Lint call the same internal apis/methods. Therefore, it would require to expose the jobs field on the API side in the file lib/api/entities/ci/lint/result.rb. Then having an optional boolean parameter include_jobs to return the field in response. By default it would be set to false as to not affect current use of the API calls.
API's to be changed include:
- POST /ci/lint
- POST /projects/:id/ci/lint
- GET /projects/:id/ci/lint
Success looks like:
- Include jobs parameter added to the above 3 API endpoints and their response including jobs field like UI counterpart
- Updated testing for above endpoints to include new jobs field
- Updated docs for CI Lint API