gitlab-org--gitlab-foss/app/helpers/triggers_helper.rb

14 lines
425 B
Ruby
Raw Normal View History

module TriggersHelper
def builds_trigger_url(project_id, ref: nil)
if ref.nil?
2017-03-05 14:58:08 -05:00
"#{Settings.gitlab.url}/api/v4/projects/#{project_id}/trigger/pipeline"
else
2017-03-05 14:58:08 -05:00
"#{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"
end
end