debian-mirror-gitlab/app/services/deploy_tokens/create_service.rb
2019-09-30 21:07:59 +05:30

11 lines
252 B
Ruby

# frozen_string_literal: true
module DeployTokens
class CreateService < BaseService
def execute
@project.deploy_tokens.create(params) do |deploy_token|
deploy_token.username = params[:username].presence
end
end
end
end