Sha256: e3f44618eb08cb705bd395bbff874335bee773fa1c9787df47582f3202d9acf0
Contents?: true
Size: 504 Bytes
Versions: 9
Compression:
Stored size: 504 Bytes
Contents
module Overcommit::Hook::PreCommit # Checks the format of an author's email address. class AuthorEmail < Base def run result = execute(%w[git config --get user.email]) email = result.stdout.chomp unless email =~ /#{@config['pattern']}/ return :bad, "Author has an invalid email address: '#{email}'\n" \ 'Set your email with ' \ '`git config --global user.email your_email@example.com`' end :good end end end
Version data entries
9 entries across 9 versions & 1 rubygems