diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-02-20 00:04:13 +0100 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-02-20 00:04:13 +0100 |
commit | 0ef796d6fedcde1ae1c731d0e772a05a08494877 (patch) | |
tree | 89186a9090f12a140e40eeada715fd8d960138c7 | |
parent | 48daab5fae66b5c134c41e159e6ca6919b3fe304 (diff) | |
download | gitlab-ce-read-template-from-repository.tar.gz |
Fix regexpread-template-from-repository
-rw-r--r-- | app/models/repository.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb index 961bf6a0324..f778af1b188 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -379,7 +379,7 @@ class Repository cache.fetch(:issue_template) do [nil, '.gitlab', '.github'].each do |path| tree(:head, path).blobs.find do |file| - file.name =~ /\Aissue_template(?\.txt)(?\.md)\z/i + file.name =~ /\Aissue_template(\.txt|\.md)?\z/i end end end @@ -389,7 +389,7 @@ class Repository cache.fetch(:merge_request_template) do [nil, '.gitlab', '.github'].each do |path| tree(:head, path).blobs.find do |file| - file.name =~ /\Amerge_request_template(?\.txt)(?\.md)\z/i + file.name =~ /\Amerge_request_template(\.txt|\.md)?\z/i end end end |