Add Danger

This commit is contained in:
nrew225 2016-10-25 14:24:45 -07:00
parent 7fc0545b5c
commit b0e2f06a8b
2 changed files with 18 additions and 1 deletions

View File

@ -6,9 +6,11 @@ node_js:
before_install:
- rvm install 2.2
- gem install awesome_bot
- gem install danger
script:
- node test.js
- awesome_bot README.md --allow-dupe --allow-redirect --allow-ssl -w notepad.cc,www.invoiceplane.com,proxy.donttrustrobots.nl,demo.phproject.org,dev.webtrees.net
- danger
#Whitelisted Reason
#www.invoiceplane.com awesome_bot receives error 500, works fine from browser
#notepad.cc not an actual link, mentioned in description

15
Dangerfile Normal file
View File

@ -0,0 +1,15 @@
# 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
# Warn when there are merge commits in the diff
warn 'Please rebase to get rid of the merge commits in this Pull Request' if git.commits.any? { |c| c.message =~ /^Merge branch 'master'/ }
# Check links
require 'json'
results = File.read 'ab-results-README.md-markdown-table.json'
j = JSON.parse results
if j['error']==true
fail j['title']
markdown j['message']
end