lib/danger/ci_source/buildkite.rb in danger-2.1.6 vs lib/danger/ci_source/buildkite.rb in danger-3.0.0
- old
+ new
@@ -12,13 +12,20 @@
# bundle exec danger
# ```
#
# ### Token Setup
#
+ # #### GitHub
+ #
# As this is self-hosted, you will need to add the `DANGER_GITHUB_API_TOKEN` to your build user's ENV. The alternative
# is to pass in the token as a prefix to the command `DANGER_GITHUB_API_TOKEN="123" bundle exec danger`.
#
+ # #### GitLab
+ #
+ # As this is self-hosted, you will need to add the `DANGER_GITLAB_API_TOKEN` to your build user's ENV. The alternative
+ # is to pass in the token as a prefix to the command `DANGER_GITLAB_API_TOKEN="123" bundle exec danger`.
+ #
class Buildkite < CI
def self.validates_as_ci?(env)
env.key? "BUILDKITE"
end
@@ -34,9 +41,9 @@
repo_matches = self.repo_url.match(%r{([\/:])([^\/]+\/[^\/.]+)(?:.git)?$})
self.repo_slug = repo_matches[2] unless repo_matches.nil?
end
def supported_request_sources
- @supported_request_sources ||= [Danger::RequestSources::GitHub]
+ @supported_request_sources ||= [Danger::RequestSources::GitHub, Danger::RequestSources::GitLab]
end
end
end