12 lines
484 B
Ruby
12 lines
484 B
Ruby
NO_NEW_SPEC_MESSAGE = <<~MSG.freeze
|
|
You've made some changes in the cookbooks, but didn't add any tests.
|
|
That's OK as long as you're refactoring existing code,
|
|
but please consider adding the ~"type::maintenance" label in that case.
|
|
MSG
|
|
|
|
all_changed_files = helper.all_changed_files
|
|
has_app_changes = all_changed_files.grep(%r{\A(files|lib)/}).any?
|
|
has_spec_changes = all_changed_files.grep(/spec/).any?
|
|
|
|
warn NO_NEW_SPEC_MESSAGE, sticky: false if has_app_changes && !has_spec_changes
|