Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
72 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Sometimes it's a README fix, or something like that - which isn't relevant for | ||
# including in a project's CHANGELOG for example | ||
declared_trivial = pr_title.include? "#trivial" | ||
|
||
# Make it more obvious that a PR is a work in progress and shouldn't be merged yet | ||
warn("PR is classed as Work in Progress") if pr_title.include? "[WIP]" | ||
|
||
# Warn no CHANGELOG | ||
warn("No CHANGELOG changes made") if lines_of_code > 50 && !modified_files.include?("CHANGELOG.yml") && !declared_trivial | ||
|
||
# Warn pod spec changes | ||
warn("RxCocoa.podspec changed") if modified_files.include?("RxCocoa.podspec") | ||
warn("RxSwift.podspec changed") if modified_files.include?("RxSwift.podspec") | ||
warn("RxTests.podspec changed") if modified_files.include?("RxTests.podspec") | ||
warn("RxBlocking.podspec changed") if modified_files.include?("RxBlocking.podspec") | ||
|
||
# Warn summary on pull request | ||
if pr_body.length < 5 | ||
warn "Please provide a summary in the Pull Request description" | ||
end | ||
|
||
# If these are all empty something has gone wrong, better to raise it in a comment | ||
if modified_files.empty? && added_files.empty? && deleted_files.empty? | ||
fail "This PR has no changes at all, this is likely a developer issue." | ||
end | ||
|
||
# Warn when there is a big PR | ||
warn("Big PR") if lines_of_code > 500 | ||
|
||
# Don't let testing shortcuts get into master by accident | ||
fail("fdescribe left in tests") if `grep -r fdescribe specs/`.length > 1 | ||
fail("fit left in tests") if `grep -r "fit specs/ `.length > 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
source 'https://rubygems.org' | ||
|
||
gem 'danger' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
addressable (2.3.8) | ||
claide (1.0.0) | ||
colored (1.2) | ||
danger (0.7.4) | ||
claide | ||
colored (~> 1.2) | ||
faraday | ||
git | ||
octokit (~> 4.2) | ||
redcarpet (~> 3.3) | ||
terminal-table (~> 1) | ||
faraday (0.9.1) | ||
multipart-post (>= 1.2, < 3) | ||
git (1.3.0) | ||
multipart-post (2.0.0) | ||
octokit (4.3.0) | ||
sawyer (~> 0.7.0, >= 0.5.3) | ||
redcarpet (3.3.4) | ||
sawyer (0.7.0) | ||
addressable (>= 2.3.5, < 2.5) | ||
faraday (~> 0.8, < 0.10) | ||
terminal-table (1.4.5) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
danger | ||
|
||
BUNDLED WITH | ||
1.12.5 |