Mirror of Awesome Self Hosted
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
825 B

8 years ago
8 years ago
8 years ago
  1. # Ensure there is a summary for a pull request
  2. fail 'Please provide a summary in the Pull Request description' if github.pr_body.length < 5
  3. # Warn if pull request is not updated
  4. warn 'Please update the Pull Request title to contain the script name' if github.pr_title.include? 'Update README.md'
  5. # Warn when there are merge commits in the diff
  6. warn 'Please rebase to get rid of the merge commits in this Pull Request' if git.commits.any? { |c| c.message =~ /^Merge branch 'master'/ }
  7. # Check links
  8. require 'json'
  9. results = File.read 'ab-results-README.md-markdown-table.json'
  10. j = JSON.parse results
  11. if j['error']==true
  12. fail j['title']
  13. markdown j['message']
  14. # Check syntx
  15. require 'json'
  16. results = File.read 'syntaxcheck.json'
  17. j = JSON.parse results
  18. if j['error']==true
  19. fail j['title']
  20. markdown j['message']
  21. end