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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
460 B
Ruby
Raw Normal View History

2018-12-05 23:21:45 +05:30
# frozen_string_literal: true
2021-03-08 18:12:59 +05:30
module Ci::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