lib/danger/ci_source/jenkins.rb in danger-5.4.3 vs lib/danger/ci_source/jenkins.rb in danger-5.5.0
- old
+ new
@@ -30,11 +30,15 @@
# With that set up, you can edit your job to add `bundle exec danger` at the build action.
#
# #### General
#
# People occasionally see issues with Danger not classing your CI runs as a PR, to give you visibilty
- # the Jenkins side of Danger expects to see one of these env vars: ghprbPullId, CHANGE_ID or gitlabMergeRequestId
+ # the Jenkins side of Danger expects to see one of these env vars:
+ # - ghprbPullId
+ # - CHANGE_ID
+ # - gitlabMergeRequestIid
+ # - gitlabMergeRequestId
#
# ### Token Setup
#
# #### GitHub
# As you own the machine, it's up to you to add the environment variable for the `DANGER_GITHUB_API_TOKEN`.
@@ -79,9 +83,11 @@
def self.pull_request_id(env)
if env["ghprbPullId"]
env["ghprbPullId"]
elsif env["CHANGE_ID"]
env["CHANGE_ID"]
+ elsif env["gitlabMergeRequestIid"]
+ env["gitlabMergeRequestIid"]
else
env["gitlabMergeRequestId"]
end
end