Class: Releases::EvidencePipelineFinder
- Inherits:
-
Object
- Object
- Releases::EvidencePipelineFinder
- Includes:
- Gitlab::Utils::StrongMemoize
- Defined in:
- app/finders/releases/evidence_pipeline_finder.rb
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#project ⇒ Object
readonly
Returns the value of attribute project.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(project, params = {}) ⇒ EvidencePipelineFinder
constructor
A new instance of EvidencePipelineFinder.
Constructor Details
#initialize(project, params = {}) ⇒ EvidencePipelineFinder
Returns a new instance of EvidencePipelineFinder.
9 10 11 12 |
# File 'app/finders/releases/evidence_pipeline_finder.rb', line 9 def initialize(project, params = {}) @project = project @params = params end |
Instance Attribute Details
#params ⇒ Object (readonly)
Returns the value of attribute params.
7 8 9 |
# File 'app/finders/releases/evidence_pipeline_finder.rb', line 7 def params @params end |
#project ⇒ Object (readonly)
Returns the value of attribute project.
7 8 9 |
# File 'app/finders/releases/evidence_pipeline_finder.rb', line 7 def project @project end |
Instance Method Details
#execute ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'app/finders/releases/evidence_pipeline_finder.rb', line 14 def execute # TODO: remove this with the release creation moved to it's own form https://gitlab.com/gitlab-org/gitlab/-/issues/214245 return params[:evidence_pipeline] if params[:evidence_pipeline] sha = existing_tag&.dereferenced_target&.sha sha ||= repository&.commit(ref)&.sha return unless sha project.ci_pipelines.for_sha(sha).last end |