diff --git a/README.md b/README.md index c2da6e6c..7fbc5820 100644 --- a/README.md +++ b/README.md @@ -714,6 +714,7 @@ GITLAB_OA_LAST_COMMIT_AUTHOR_EMAIL GITLAB_OA_WIP GITLAB_OA_URL GITLAB_OA_ACTION +GITLAB_OA_OLDREV GITLAB_OA_ASSIGNEE_NAME GITLAB_OA_ASSIGNEE_USERNAME GITLAB_OA_ASSIGNEE_AVATAR_URL diff --git a/src/main/java/io/jenkins/plugins/gitlabbranchsource/Cause/GitLabMergeRequestCauseData.java b/src/main/java/io/jenkins/plugins/gitlabbranchsource/Cause/GitLabMergeRequestCauseData.java index 848769bc..4c4018cd 100644 --- a/src/main/java/io/jenkins/plugins/gitlabbranchsource/Cause/GitLabMergeRequestCauseData.java +++ b/src/main/java/io/jenkins/plugins/gitlabbranchsource/Cause/GitLabMergeRequestCauseData.java @@ -295,6 +295,9 @@ public GitLabMergeRequestCauseData(MergeRequestEvent mergeRequestEvent) { this.variables.put( "GITLAB_OA_ACTION", defaultString(mergeRequestEvent.getObjectAttributes().getAction())); + this.variables.put( + "GITLAB_OA_OLDREV", + defaultString(mergeRequestEvent.getObjectAttributes().getOldrev())); if (mergeRequestEvent.getObjectAttributes().getAssignee() != null) { this.variables.put( "GITLAB_OA_ASSIGNEE_NAME",