Commit 0a4db90d authored by Jacob Vosmaer's avatar Jacob Vosmaer

Use begin/end instead of defined?

parent c76e6b98
......@@ -205,11 +205,11 @@ module Ci
end
def ci_yaml_file
return @ci_yaml_file if defined?(@ci_yaml_file)
@ci_yaml_file ||= begin
blob = project.repository.blob_at(sha, '.gitlab-ci.yml')
blob.load_all_data!(project.repository)
@ci_yaml_file = blob.data
blob.data
end
rescue
nil
end
......
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