Commit 65444a3a authored by Orta's avatar Orta Committed by GitHub

Merge pull request #5639 from CocoaPods/orta-dangerfile_scoped

Update Danger and use scoped syntax for git/github metadata
parents 80701b0b 193edceb
# Don't let testing shortcuts get into master by accident # Don't let testing shortcuts get into master by accident,
# ensuring that we don't get green builds based on a subset of tests
(modified_files + added_files - %w(Dangerfile)).each do |file| (git.modified_files + git.added_files - %w(Dangerfile)).each do |file|
next unless File.file?(file) next unless File.file?(file)
contents = File.read(file) contents = File.read(file)
if file.start_with?('spec') if file.start_with?('spec')
...@@ -10,14 +10,14 @@ ...@@ -10,14 +10,14 @@
end end
# Ensure a clean commits history # Ensure a clean commits history
if commits.any? { |c| c.message =~ /^Merge branch '#{branch_for_merge}'/ } if git.commits.any? { |c| c.message =~ /^Merge branch '#{github.branch_for_base}'/ }
fail('Please rebase to get rid of the merge commits in this PR') fail('Please rebase to get rid of the merge commits in this PR')
end end
# Request a CHANGELOG entry, and give an example # Request a CHANGELOG entry, and give an example
has_app_changes = !modified_files.grep(/lib/).empty? has_app_changes = !git.modified_files.grep(/lib/).empty?
if !modified_files.include?('CHANGELOG.md') && has_app_changes if !git.modified_files.include?('CHANGELOG.md') && has_app_changes
fail('Please include a CHANGELOG entry to credit yourself! \nYou can find it at [CHANGELOG.md](https://github.com/CocoaPods/CocoaPods/blob/master/CHANGELOG.md).', :sticky => false) fail("Please include a CHANGELOG entry to credit yourself! \nYou can find it at [CHANGELOG.md](https://github.com/CocoaPods/CocoaPods/blob/master/CHANGELOG.md).", :sticky => false)
markdown <<-MARKDOWN markdown <<-MARKDOWN
Here's an example of your CHANGELOG entry: Here's an example of your CHANGELOG entry:
......
...@@ -126,6 +126,10 @@ GEM ...@@ -126,6 +126,10 @@ GEM
ast (2.2.0) ast (2.2.0)
awesome_print (1.6.1) awesome_print (1.6.1)
bacon (1.2.0) bacon (1.2.0)
claide-plugins (0.9.0)
cork (~> 0)
nap (~> 1.0)
open4 (~> 1.3)
clintegracon (0.8.1) clintegracon (0.8.1)
colored (~> 1.2) colored (~> 1.2)
diffy diffy
...@@ -135,13 +139,18 @@ GEM ...@@ -135,13 +139,18 @@ GEM
pry (= 0.10.3) pry (= 0.10.3)
coderay (1.1.0) coderay (1.1.0)
colored (1.2) colored (1.2)
cork (0.1.0)
colored (~> 1.2)
crack (0.4.2) crack (0.4.2)
safe_yaml (~> 1.0.0) safe_yaml (~> 1.0.0)
danger (0.7.4) danger (0.10.0)
claide claide (~> 1.0)
claide-plugins (~> 0.9)
colored (~> 1.2) colored (~> 1.2)
faraday cork (~> 0.1)
git faraday (~> 0)
faraday-http-cache (~> 1.0)
git (~> 1)
octokit (~> 4.2) octokit (~> 4.2)
redcarpet (~> 3.3) redcarpet (~> 3.3)
terminal-table (~> 1) terminal-table (~> 1)
...@@ -149,6 +158,8 @@ GEM ...@@ -149,6 +158,8 @@ GEM
escape (0.0.4) escape (0.0.4)
faraday (0.9.2) faraday (0.9.2)
multipart-post (>= 1.2, < 3) multipart-post (>= 1.2, < 3)
faraday-http-cache (1.3.0)
faraday (~> 0.8)
ffi (1.9.6) ffi (1.9.6)
fourflusher (1.0.1) fourflusher (1.0.1)
fuzzy_match (2.0.4) fuzzy_match (2.0.4)
...@@ -183,6 +194,7 @@ GEM ...@@ -183,6 +194,7 @@ GEM
notify (0.5.2) notify (0.5.2)
octokit (4.3.0) octokit (4.3.0)
sawyer (~> 0.7.0, >= 0.5.3) sawyer (~> 0.7.0, >= 0.5.3)
open4 (1.3.4)
parser (2.3.0.6) parser (2.3.0.6)
ast (~> 2.2) ast (~> 2.2)
powerpack (0.1.1) powerpack (0.1.1)
...@@ -217,7 +229,7 @@ GEM ...@@ -217,7 +229,7 @@ GEM
sparkr (0.4.1) sparkr (0.4.1)
term-ansicolor (1.3.2) term-ansicolor (1.3.2)
tins (~> 1.0) tins (~> 1.0)
terminal-table (1.5.2) terminal-table (1.6.0)
thread_safe (0.3.5) thread_safe (0.3.5)
tins (1.8.1) tins (1.8.1)
tzinfo (1.2.2) tzinfo (1.2.2)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment