trigger_request.rb 369 Bytes
Newer Older
1 2 3
module Ci
  class TriggerRequest < ActiveRecord::Base
    extend Ci::Model
4

5 6 7
    belongs_to :trigger
    belongs_to :pipeline, foreign_key: :commit_id
    has_many :builds
8 9

    serialize :variables
10 11 12 13 14 15 16 17

    def user_variables
      return [] unless variables

      variables.map do |key, value|
        { key: key, value: value, public: false }
      end
    end
18 19
  end
end