Merge Request Approval state as environment variable in pipelines

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

  • Close this issue

Problem to solve

Deciding whether a merge request is approved or not within a pipeline.

Intended users

  • Devon (DevOps Engineer)

Further details

DevOps who incorporate a code review in any stage of their workflow and want to evaluate approval state within the pipeline. Thus the'd have easy access to this information instead of calling the api manually.

Proposal

Set a CI_MERGE_REQUEST_APPROVED environment variable which consolidates (AND concatenated) the approval of all rules (if multi-rule enabled)

Permissions and Security

tbd

Documentation

tbd

Testing

tbd

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

Whether the environment variable is present for merge requests with only: merge_requests

What is the type of buyer?

tbd

Links / references

Edited Sep 04, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading