Update Dangerfile
This commit is contained in:
parent
2baa3cff6f
commit
f606bfb558
22
Dangerfile
22
Dangerfile
@ -9,19 +9,23 @@ warn 'Please update the Pull Request title to contain the script name' if github
|
|||||||
warn 'Please rebase to get rid of the merge commits in this Pull Request' if git.commits.any? { |c| c.message =~ /^Merge branch 'master'/ }
|
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
|
# Check links
|
||||||
require 'json'
|
if [ -a ab-results-README.md-markdown-table.json ]
|
||||||
results = File.read 'ab-results-README.md-markdown-table.json'
|
require 'json'
|
||||||
j = JSON.parse results
|
results = File.read 'ab-results-README.md-markdown-table.json'
|
||||||
if j['error']==true
|
j = JSON.parse results
|
||||||
|
if j['error']==true
|
||||||
fail j['title']
|
fail j['title']
|
||||||
markdown j['message']
|
markdown j['message']
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Check syntax
|
# Check syntax
|
||||||
require 'json'
|
if [ -a syntaxcheck.json ]
|
||||||
results = File.read 'syntaxcheck.json'
|
require 'json'
|
||||||
j = JSON.parse results
|
results = File.read 'syntaxcheck.json'
|
||||||
if j['error']==true
|
j = JSON.parse results
|
||||||
|
if j['error']==true
|
||||||
fail j['title']
|
fail j['title']
|
||||||
markdown j['message']
|
markdown j['message']
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user