Skip to content

Add deployment approver settings to API

What does this MR do and why?

Relate Issue: #390756 (closed)
Relate Jihu Issue: https://jihulab.com/gitlab-cn/gitlab/-/issues/2545

The previous MR !104720 (merged) supported modifying the allow_pipeline_trigger_approve_deployment attribute of project through the UI. The current MR adds support for this field in the API.

Screenshots or screen recordings

No UI changes.

How to set up and validate locally

License: GitLab Premium

  1. PUT
curl --location --request PUT 'http://127.0.0.1:3000/api/v4/projects/{PROJECT-ID}' \
--header 'PRIVATE-TOKEN: {YOUR-PRIVATE-TOKEN}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'allow_pipeline_trigger_approve_deployment=true'
  1. GET
curl --location --request GET 'http://127.0.0.1:3000/api/v4/projects/{PROJECT-ID}' \
--header 'PRIVATE-TOKEN: {YOUR-PRIVATE-TOKEN} \

cc @mtan-gitlab @icbd

Edited by Zhiyuan Lu

Merge request reports