BigW Consortium Gitlab

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

parent 9e7e2c6b
......@@ -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'
......
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