debian-mirror-gitlab/app/helpers/triggers_helper.rb

16 lines
456 B
Ruby
Raw Normal View History

2018-12-05 23:21:45 +05:30
# frozen_string_literal: true
2015-10-24 18:46:33 +05:30
module TriggersHelper
2017-08-17 22:00:37 +05:30
def builds_trigger_url(project_id, ref: nil)
if ref.nil?
"#{Settings.gitlab.url}/api/v4/projects/#{project_id}/trigger/pipeline"
else
"#{Settings.gitlab.url}/api/v4/projects/#{project_id}/ref/#{ref}/trigger/pipeline"
end
end
def service_trigger_url(service)
2017-09-10 17:25:29 +05:30
"#{Settings.gitlab.url}/api/v4/projects/#{service.project_id}/services/#{service.to_param}/trigger"
2015-10-24 18:46:33 +05:30
end
end