Module: TriggersHelper

Included in:
MattermostSlashCommandsService, Projects::MattermostsController, SlackSlashCommandsService
Defined in:
app/helpers/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/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

#service_trigger_url(service) ⇒ Object


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

def service_trigger_url(service)
  "#{Settings.gitlab.url}/api/v4/projects/#{service.project_id}/services/#{service.to_param}/trigger"
end