Skip to content
Snippets Groups Projects
Commit 0a4db90d authored by Jacob Vosmaer (GitLab)'s avatar Jacob Vosmaer (GitLab)
Browse files

Use begin/end instead of defined?

parent c76e6b98
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -205,11 +205,11 @@ module Ci
end
 
def ci_yaml_file
return @ci_yaml_file if defined?(@ci_yaml_file)
blob = project.repository.blob_at(sha, '.gitlab-ci.yml')
blob.load_all_data!(project.repository)
@ci_yaml_file = blob.data
@ci_yaml_file ||= begin
blob = project.repository.blob_at(sha, '.gitlab-ci.yml')
blob.load_all_data!(project.repository)
blob.data
end
rescue
nil
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment