Module: Ci::TriggersHelper

Included in:
Integrations::SlackSlashCommands, Projects::MattermostsController
Defined in:
app/helpers/ci/triggers_helper.rb

Instance Method Summary collapse

Instance Method Details

#builds_trigger_url(project_id, ref: nil) ⇒ Object



4
5
6
7
8
9
10
# File 'app/helpers/ci/triggers_helper.rb', line 4

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

#integration_trigger_url(integration) ⇒ Object



12
13
14
# File 'app/helpers/ci/triggers_helper.rb', line 12

def integration_trigger_url(integration)
  "#{Settings.gitlab.url}/api/v4/projects/#{integration.project_id}/integrations/#{integration.to_param}/trigger"
end