jenkinsci / jenkinsci/gitlab-plugin

Jenkins job is triggered when approval is revoked.

Open
#1,075 2 comments 5 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1.4k
Forks
615
Avg merge
4h 32m
Merged PRs (30d)
10

Description

## Issue

When a Merge Request approval is **revoked**, Gitlab creates an event which is sent to Jenkins. When using the **Approved Merge Requests (EE-only)** trigger option, the Jenkins job triggers a build. I am trying to prevent this from happening.

When looking up the metadata which Gitlab sends to Jenkins, I see there is one particular key value that is being sent to Jenkins. This is the "action": "unapproved" within the "object_attributes" object.

Are we able to convert this value into an environment variable so we can skip the build? Or alternatively, do not allow Jenkins to trigger a job on this action (revoke approval)

### Context
- **Gitlab plugin version**: 1.5.13
- **Gitlab version**: 13.1.4-ee
- **Jenkins version**: 2.236
- **Job type**: Pipeline

### Problem description

_Describe your problem in a meaningful way_:
- Revoke a Merge Request approval while using the **Approved Merge Requests (EE-only)** trigger option
- Jenkins job should not trigger
- Jenkins job is triggered

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.