gitlab-org--gitlab-foss/app/models/ci/trigger_request.rb

20 lines
369 B
Ruby
Raw Normal View History

2015-08-25 21:42:46 -04:00
module Ci
class TriggerRequest < ActiveRecord::Base
extend Ci::Model
belongs_to :trigger
belongs_to :pipeline, foreign_key: :commit_id
has_many :builds
2015-08-25 21:42:46 -04:00
serialize :variables
2016-07-20 07:17:21 -04:00
def user_variables
return [] unless variables
variables.map do |key, value|
{ key: key, value: value, public: false }
end
end
2015-08-25 21:42:46 -04:00
end
end