diff options
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/ci/commit.rb | 6 | ||||
-rw-r--r-- | app/models/tree.rb | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/app/models/ci/commit.rb b/app/models/ci/commit.rb index d2a29236942..96786ac4573 100644 --- a/app/models/ci/commit.rb +++ b/app/models/ci/commit.rb @@ -205,7 +205,11 @@ module Ci end def ci_yaml_file - @ci_yaml_file ||= project.repository.blob_at(sha, '.gitlab-ci.yml').data + 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 rescue nil end diff --git a/app/models/tree.rb b/app/models/tree.rb index e0e04d8859f..ecee54c3e0a 100644 --- a/app/models/tree.rb +++ b/app/models/tree.rb @@ -31,6 +31,8 @@ class Tree git_repo = repository.raw_repository @readme = Gitlab::Git::Blob.find(git_repo, sha, readme_path) + @readme.load_all_data!(git_repo) + @readme end def trees |