Skip to content

Add CI variable CI_MERGE_REQUEST_APPROVED [RUN AS-IF-FOSS]

Albert requested to merge alberts-add-variable-ci_merge_request_approved into master

What does this MR do?

Add CI variable CI_MERGE_REQUEST_APPROVED.

This variable indicates the approval status of the merge request. Only available when the merge request approval feature is available. Can be true or false.

Part of #222369 (closed) / #334352 (closed).

Screenshots (strongly suggested)

  • Before approval - variable is not set:

https://gitlab-review-alberts-ad-r29087.gitlab-review.app/root/test-ci-variable/-/jobs/10#L189 Screenshot_2021-06-24_at_12.08.01_PM

  • After approval - variable is true:

https://gitlab-review-alberts-ad-r29087.gitlab-review.app/root/test-ci-variable/-/jobs/6#L22

Screenshot_2021-06-23_at_2.34.54_PM

  • On non-MR pipeline - variable is not set:

https://gitlab-review-alberts-ad-r29087.gitlab-review.app/root/test-ci-variable/-/jobs/4#L25

Screenshot_2021-06-23_at_2.33.55_PM

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Albert

Merge request reports