Sha256: 4f9c3df0b542c41de60900a0bdf9735095f952b4ee0eff70399be367e8687eef
Contents?: true
Size: 971 Bytes
Versions: 10
Compression:
Stored size: 971 Bytes
Contents
# https://semaphoreci.com/docs/available-environment-variables.html module Danger # ### CI Setup # # For Semaphor you will want to go to the settings page of the project. Inside "Build Settings" # you should add `bundle exec danger` to the Setup thread. # # ### Token Setup # # You can add your `DANGER_GITHUB_API_TOKEN` inside the "Environment Variables" section in the settings. # class Semaphore < CI def self.validates_as_ci?(env) env.key? "SEMAPHORE" end def self.validates_as_pr?(env) ["SEMAPHORE_REPO_SLUG", "PULL_REQUEST_NUMBER"].all? { |x| env[x] } end def supported_request_sources @supported_request_sources ||= [Danger::RequestSources::GitHub] end def initialize(env) self.repo_slug = env["SEMAPHORE_REPO_SLUG"] self.pull_request_id = env["PULL_REQUEST_NUMBER"] self.repo_url = GitRepo.new.origins # Semaphore doesn't provide a repo url env variable :/ end end end
Version data entries
10 entries across 10 versions & 1 rubygems