Skip to content

Commit

Permalink
[danger] cleanup [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
dkhamsing authored Jul 27, 2016
1 parent 3468923 commit d3cbe90
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions Dangerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
# Ensure there is a summary for a pull request
fail "Please provide a summary in the Pull Request description" if github.pr_body.length < 5
fail 'Please provide a summary in the Pull Request description' if github.pr_body.length < 5

# Warn when there are merge commits in the diff
if git.commits.any? { |c| c.message =~ /^Merge branch 'master'/ }
warn 'Please rebase to get rid of the merge commits in this Pull Request'
end
warn 'Please rebase to get rid of the merge commits in this Pull Request' if git.commits.any? { |c| c.message =~ /^Merge branch 'master'/ }

# Only one library per pull request
fail "Please only add one library per Pull Request" if git.lines_of_code > 1
fail Please only add one library per Pull Request' if git.lines_of_code > 1
# Pull request title warning
# Warn if pull request is not updated
warn 'Please update the Pull Request title' if github.pr_title.include? 'Update README.md'

0 comments on commit d3cbe90

Please sign in to comment.