Sha256: 13a9dee3252c6003407c2a32f76e6d71ff3bced6aaa08e32e83856a2593e51a5

Contents?: true

Size: 1.21 KB

Versions: 11

Compression:

Stored size: 1.21 KB

Contents

# Make sure non-trivial amounts of code changes come with corresponding tests
has_app_changes = !git.modified_files.grep(/lib/).empty?
has_spec_changes = !git.modified_files.grep(/spec/).empty?

if git.lines_of_code > 50 && has_app_changes && !has_spec_changes
  warn('There are code changes, but no corresponding tests. '\
         'Please include tests if this PR introduces any modifications in '\
         'behavior.',
       sticky: false)
end

# Mainly to encourage writing up some reasoning about the PR, rather than
# just leaving a title
warn('Please add a detailed summary in the description.') if github.pr_body.length < 5

# Let people say that this isn't worth a CHANGELOG entry in the PR if they choose
declared_trivial = (github.pr_title + github.pr_body).include?('#trivial') || !has_app_changes

if !git.modified_files.include?('CHANGELOG.md') && !declared_trivial
  error_message = "Please include a CHANGELOG entry. \nYou can find it at " \
                  '[CHANGELOG.md](https://github.com/ualbertalib/pushmi_pullyu/blob/master/CHANGELOG.md).'
  fail(error_message, sticky: false)
end

# Warn when there is a big PR
warn('This PR is too big! Consider breaking it down into smaller PRs.') if git.lines_of_code > 500

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
pushmi_pullyu-2.1.3 Dangerfile
pushmi_pullyu-2.1.2 Dangerfile
pushmi_pullyu-2.1.1 Dangerfile
pushmi_pullyu-2.0.7 Dangerfile
pushmi_pullyu-2.0.6 Dangerfile
pushmi_pullyu-2.0.5 Dangerfile
pushmi_pullyu-2.0.4 Dangerfile
pushmi_pullyu-2.0.3 Dangerfile
pushmi_pullyu-2.0.2 Dangerfile
pushmi_pullyu-2.0.1 Dangerfile
pushmi_pullyu-2.0.0 Dangerfile