module Causes::GitHook
  class ReleaseNote < HookSpecificCheck
    include HookRegistry

    EMPTY_RELEASE_NOTE = /^release notes?\s*[:.]?\n{2,}/im
    def run_check
      if commit_message.join =~ EMPTY_RELEASE_NOTE
        return :warn, 'Empty release note found, either add one or remove it'
      end

      :good
    end
  end
end

Add empty 'release note' linter for commit message
Add empty 'release note' linter for commit message

Still a warning, but better than letting these slip through.

Related story:
  https://www.pivotaltracker.com/story/show/48023785 (delivery)

Change-Id: I45e6fdb7dfa64ba2e5e6e9b6444cb51fb87e13ee
Reviewed-on: https://gerrit.causes.com/22211
Tested-by: Aiden Scandella <1faf1e8390cdac9204f160c35828cc423b7acd7b@causes.com>
Reviewed-by: Joe Lencioni <1dd72cf724deaab5db236f616560fc7067b734e1@causes.com>
