Skip to content

Commit

Permalink
Use CI for base/head
Browse files Browse the repository at this point in the history
  • Loading branch information
orta committed Feb 12, 2016
1 parent b730589 commit 456ff79
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions lib/danger/commands/local.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ def run
puts ""

gh = GitHub.new(dm.env.ci_source, ENV)
# We can use tokenless here, as it's running on someone's computer
# and is IP locked, as opposed to on the CI.
gh.support_tokenless_auth = true
gh.fetch_details

Expand Down
6 changes: 3 additions & 3 deletions lib/danger/dangerfile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ def print_known_info
puts "Metadata:"
puts "#{'SCM'.blue} : #{env.scm.class}"
puts "#{'Source'.blue} : #{env.ci_source.class}"
puts " #{'Base commit'.blue} : #{env.ci_source.base_commit}" if env.ci_source.respond_to? :base_commit
puts " #{'HEAD commit'.blue} : #{env.ci_source.head_commit}" if env.ci_source.respond_to? :head_commit
puts " git diff #{env.ci_source.base_commit} #{env.ci_source.head_commit}".yellow
puts "#{'Requests'.blue} : #{env.request_source.class}"
puts " #{'Base commit'.blue} : #{env.request_source.base_commit}"
puts " #{'HEAD commit'.blue} : #{env.request_source.head_commit}"
puts " git diff #{env.request_source.base_commit} #{env.request_source.head_commit}".yellow
puts "\n\n"
end

Expand Down

0 comments on commit 456ff79

Please sign in to comment.