diff options
author | Robert Speicher <rspeicher@gmail.com> | 2019-07-26 17:32:20 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2019-07-26 17:32:20 +0300 |
commit | 900ef6fc316c7d4024545b5d08598c61fa9f3936 (patch) | |
tree | 7d3bcf2a70326434f67be6dcffa8e55489d60944 /lib | |
parent | 995d8e6c5e52afc294573e016f86f2a429b85d8e (diff) | |
parent | ae58f82e62d60edf0a1de2790d1798f5b5f16b28 (diff) |
Merge branch 'mc/feature/find-all-artifacts-for-sha' into 'master'
Find build by sha from ref
Closes #64534 and #45697
See merge request gitlab-org/gitlab-ce!30843
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/job_artifacts.rb | 4 | ||||
-rw-r--r-- | lib/gitlab/badge/coverage/report.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/job_artifacts.rb b/lib/api/job_artifacts.rb index e7fed55170e..b35aa952f81 100644 --- a/lib/api/job_artifacts.rb +++ b/lib/api/job_artifacts.rb @@ -27,7 +27,7 @@ module API requirements: { ref_name: /.+/ } do authorize_download_artifacts! - latest_build = user_project.latest_successful_build_for!(params[:job], params[:ref_name]) + latest_build = user_project.latest_successful_build_for_ref!(params[:job], params[:ref_name]) present_carrierwave_file!(latest_build.artifacts_file) end @@ -45,7 +45,7 @@ module API requirements: { ref_name: /.+/ } do authorize_download_artifacts! - build = user_project.latest_successful_build_for!(params[:job], params[:ref_name]) + build = user_project.latest_successful_build_for_ref!(params[:job], params[:ref_name]) path = Gitlab::Ci::Build::Artifacts::Path .new(params[:artifact_path]) diff --git a/lib/gitlab/badge/coverage/report.rb b/lib/gitlab/badge/coverage/report.rb index 7f7cc62c8ef..15cccc6f287 100644 --- a/lib/gitlab/badge/coverage/report.rb +++ b/lib/gitlab/badge/coverage/report.rb @@ -14,7 +14,7 @@ module Gitlab @ref = ref @job = job - @pipeline = @project.ci_pipelines.latest_successful_for(@ref) + @pipeline = @project.ci_pipelines.latest_successful_for_ref(@ref) end def entity |