lib/danger/ci_source/jenkins.rb in danger-3.3.0 vs lib/danger/ci_source/jenkins.rb in danger-3.3.1

- old
+ new

@@ -1,7 +1,11 @@ # https://wiki.jenkins-ci.org/display/JENKINS/Building+a+software+project#Buildingasoftwareproject-JenkinsSetEnvironmentVariables # https://wiki.jenkins-ci.org/display/JENKINS/GitHub+pull+request+builder+plugin +require "danger/request_sources/github" +require "danger/request_sources/gitlab" +require "danger/request_sources/bitbucket_server" +require "danger/request_sources/bitbucket_cloud" module Danger # https://jenkins-ci.org # ### CI Setup @@ -36,10 +40,17 @@ id = pull_request_id(env) !id.nil? && !id.empty? end def supported_request_sources - @supported_request_sources ||= [Danger::RequestSources::GitHub, Danger::RequestSources::GitLab, Danger::RequestSources::BitbucketServer, Danger::RequestSources::BitbucketCloud] + @supported_request_sources ||= begin + [ + Danger::RequestSources::GitHub, + Danger::RequestSources::GitLab, + Danger::RequestSources::BitbucketServer, + Danger::RequestSources::BitbucketCloud + ] + end end def initialize(env) self.repo_url = env["GIT_URL"] self.pull_request_id = self.class.pull_request_id(env)