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

14 lines
425 B
Ruby
Raw Normal View History

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)
"#{Settings.gitlab.url}/api/v3/projects/#{service.project_id}/services/#{service.to_param}/trigger"
2015-10-24 18:46:33 +05:30
end
end