Commit ed8e1faa authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Make sure Repository#gitlab_ci_yml is safe to use even when repository is missing

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 9e7e2c6b
...@@ -468,7 +468,7 @@ class Repository ...@@ -468,7 +468,7 @@ class Repository
end end
def gitlab_ci_yml def gitlab_ci_yml
return nil if empty? return nil if !exists? || empty?
@gitlab_ci_yml ||= tree(:head).blobs.find do |file| @gitlab_ci_yml ||= tree(:head).blobs.find do |file|
file.name == '.gitlab-ci.yml' file.name == '.gitlab-ci.yml'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment