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