1
0
Fork 0
mirror of https://github.com/bayandin/awesome-awesomeness.git synced 2025-04-07 17:22:55 -04:00

Update Dangerfile

This commit is contained in:
Miguel Piedrafita 2016-12-05 20:44:32 +01:00 committed by GitHub
parent 6036313244
commit fa6e4fd016

View file

@ -5,12 +5,12 @@ has_readme_changes = git.modified_files.include?("README.md")
fail 'Please provide a summary in the Pull Request description' if github.pr_body.length < 5
# Warn if PR guideline boxes are not checked.
warn 'Please check PR guidelines and check the boxes.' if github.pr_body.include? '- [ ]'
fail 'Please check PR guidelines and check the boxes.' if github.pr_body.include? '- [ ]'
# Warn the user if pull request fields remain unchanged
warn 'Please replace **[Insert URL to the list here.]** with the URL to the list.' if github.pr_body.include? '**[Insert URL to the list here.]**'
warn 'Please replace **[Explain what this list is about and why it should be included here.]** with an explanation of why we should include this list.' if github.pr_body.include? '**[Explain what this list is about and why it should be included here.]**'
fail 'Please replace **[Insert URL to the list here.]** with the URL to the list.' if github.pr_body.include? '**[Insert URL to the list here.]**'
fail 'Please replace **[Explain what this list is about and why it should be included here.]** with an explanation of why we should include this list.' if github.pr_body.include? '**[Explain what this list is about and why it should be included here.]**'
# Warn if pull request is not updated
warn 'Please update the Pull Request title to contain the script name' if github.pr_title.include? 'Update README.md'
fail 'Please update the Pull Request title to contain the script name' if github.pr_title.include? 'Update README.md'
# 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'/ }