blob: 56b64d6049be12186a1931fc6c02555b2c364dd1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
# frozen_string_literal: true
module Ci::TriggersHelper
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 integration_trigger_url(integration)
"#{Settings.gitlab.url}/api/v4/projects/#{integration.project_id}/integrations/#{integration.to_param}/trigger"
end
end
|