Skip to content

Commit

Permalink
[api] allow to hand over setrelease via token trigger
Browse files Browse the repository at this point in the history
Release command knows the setrelease parameter. Make it
also possible to use it when executing via a token.
  • Loading branch information
adrianschroeter committed Oct 11, 2024
1 parent bdec977 commit 9f7d5f6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/api/app/controllers/trigger_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ def create

opts = { project: @project, package: @package, repository: params[:repository], arch: params[:arch],
targetproject: params[:targetproject], targetrepository: params[:targetrepository],
filter_source_repository: params[:filter_source_repository] }
filter_source_repository: params[:filter_source_repository],
setrelease: params[:setrelease] }
opts[:multibuild_flavor] = @multibuild_container if @multibuild_container.present?
@token.executor.run_as { @token.call(opts) }

Expand Down
1 change: 1 addition & 0 deletions src/api/app/models/token/release.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def release(package_to_release, source_repository, target_repository, time_now,
comment: 'Releasing via trigger event' }
opts[:multibuild_container] = options[:multibuild_flavor] if options[:multibuild_flavor].present?
opts[:filter_architecture] = options[:arch] if options[:arch].present?
opts[:setrelease] = options[:setrelease] if options[:setrelease].present?

if package_to_release.present?
release_package(package_to_release,
Expand Down

0 comments on commit 9f7d5f6

Please sign in to comment.