Make sure Repository#gitlab_ci_yml is safe to use even when repository is missing
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
parent
9e7e2c6b9d
commit
ed8e1faa4c
|
@ -468,7 +468,7 @@ class Repository
|
|||
end
|
||||
|
||||
def gitlab_ci_yml
|
||||
return nil if empty?
|
||||
return nil if !exists? || empty?
|
||||
|
||||
@gitlab_ci_yml ||= tree(:head).blobs.find do |file|
|
||||
file.name == '.gitlab-ci.yml'
|
||||
|
|
Loading…
Reference in New Issue