diff options
Diffstat (limited to 'app/models/packages')
-rw-r--r-- | app/models/packages/package.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/models/packages/package.rb b/app/models/packages/package.rb index dcc3970c49f..34eae6ab5dc 100644 --- a/app/models/packages/package.rb +++ b/app/models/packages/package.rb @@ -293,6 +293,13 @@ class Packages::Package < ApplicationRecord ::Packages::Maven::Metadata::SyncWorker.perform_async(user.id, project.id, name) end + def create_build_infos!(build) + return unless build&.pipeline + + # TODO: use an upsert call when https://gitlab.com/gitlab-org/gitlab/-/issues/339093 is implemented + build_infos.find_or_create_by!(pipeline: build.pipeline) + end + private def composer_tag_version? |