This instance will be upgraded to Heptapod 0.31.0rc on 2022-05-19 at 11:00 UTC+2 (a few minutes of down time)

triggers_helper.rb 421 Bytes
Newer Older
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
1
module TriggersHelper
2
3
4
5
6
7
  def builds_trigger_url(project_id, ref: nil)
    if ref.nil?
      "#{Settings.gitlab.url}/api/v3/projects/#{project_id}/trigger/builds"
    else
      "#{Settings.gitlab.url}/api/v3/projects/#{project_id}/ref/#{ref}/trigger/builds"
    end
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
8
  end
9
10
11
12

  def service_trigger_url(service)
    "#{Settings.gitlab.url}/api/v3/projects/#{service.project_id}/services/#{service.to_param}/trigger"
  end
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
13
end