jenkinsci / jenkinsci/gitlab-plugin

Merge Request owner email environment variable

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

Description

### Feature Request

Currently, when a job is triggered by a comment/note on a merge request (and I assume for any other case related to a merge request), variable gitlabUserEmail is set based on the last commit in the merge request i.e. webhook field merge_request.last_commit.author.email. This is not always the most useful user to associate with the job. Consider e.g. an integration engineer who created an MR to cherry-pick 10 changes, each by a different user, from one branch to another. Ideally, I'd like to associate the Jenkins job with the integration engineer who created the MR, not one of the possibly many people who created a commit contained within the MR.

Summary: Create environment variables gitlabMergeRequestOwnerName, gitlabMergeRequestOwnerUsername, gitlabMergeRequestOwnerEmail variables.

I think this would need to be implemented by executing a Gitlab API to query the owner of the MR based on webhook field merge_request.id, then another Gitlab API to query the owner's information name/email.

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.