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:
Dmitriy Zaporozhets 2016-03-25 14:19:20 +01:00
parent 9e7e2c6b9d
commit ed8e1faa4c
No known key found for this signature in database
GPG Key ID: 627C5F589F467F17
1 changed files with 1 additions and 1 deletions

View File

@ -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'