mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-19 06:15:44 -04:00
Use Regex to search for author
This commit is contained in:
@@ -29,7 +29,10 @@ Please set it using
|
||||
end
|
||||
end
|
||||
|
||||
unless File.read('CONTRIBUTORS.md').include? author
|
||||
# Escape chars in name, and make case insensitive
|
||||
author_to_search_for = Regexp.new(Regexp.escape(author), Regexp::IGNORECASE)
|
||||
|
||||
unless File.read('CONTRIBUTORS.md').match?(author_to_search_for)
|
||||
abort %(
|
||||
Thanks for your contribution, #{author}!
|
||||
Please add your name and GitHub handle to the file CONTRIBUTORS.md,
|
||||
|
||||
Reference in New Issue
Block a user