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
(modified_files + added_files - %w(Dangerfile)).each do |file|
# Don't let testing shortcuts get into master by accident,
# ensuring that we don't get green builds based on a subset of tests
(git.modified_files + git.added_files - %w(Dangerfile)).each do |file|
next unless File.file?(file)
contents = File.read(file)
if file.start_with?('spec')
......@@ -10,14 +10,14 @@
end
# 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')
end
# Request a CHANGELOG entry, and give an example
has_app_changes = !modified_files.grep(/lib/).empty?
if !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)
has_app_changes = !git.modified_files.grep(/lib/).empty?
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)
markdown <<-MARKDOWN
Here's an example of your CHANGELOG entry:
......
......@@ -126,6 +126,10 @@ GEM
ast (2.2.0)
awesome_print (1.6.1)
bacon (1.2.0)
claide-plugins (0.9.0)
cork (~> 0)
nap (~> 1.0)
open4 (~> 1.3)
clintegracon (0.8.1)
colored (~> 1.2)
diffy
......@@ -135,13 +139,18 @@ GEM
pry (= 0.10.3)
coderay (1.1.0)
colored (1.2)
cork (0.1.0)
colored (~> 1.2)
crack (0.4.2)
safe_yaml (~> 1.0.0)
danger (0.7.4)
claide
danger (0.10.0)
claide (~> 1.0)
claide-plugins (~> 0.9)
colored (~> 1.2)
faraday
git
cork (~> 0.1)
faraday (~> 0)
faraday-http-cache (~> 1.0)
git (~> 1)
octokit (~> 4.2)
redcarpet (~> 3.3)
terminal-table (~> 1)
......@@ -149,6 +158,8 @@ GEM
escape (0.0.4)
faraday (0.9.2)
multipart-post (>= 1.2, < 3)
faraday-http-cache (1.3.0)
faraday (~> 0.8)
ffi (1.9.6)
fourflusher (1.0.1)
fuzzy_match (2.0.4)
......@@ -183,6 +194,7 @@ GEM
notify (0.5.2)
octokit (4.3.0)
sawyer (~> 0.7.0, >= 0.5.3)
open4 (1.3.4)
parser (2.3.0.6)
ast (~> 2.2)
powerpack (0.1.1)
......@@ -217,7 +229,7 @@ GEM
sparkr (0.4.1)
term-ansicolor (1.3.2)
tins (~> 1.0)
terminal-table (1.5.2)
terminal-table (1.6.0)
thread_safe (0.3.5)
tins (1.8.1)
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