26 lines
849 B
Ruby
26 lines
849 B
Ruby
![]() |
module ServicesHelper
|
||
|
def service_event_description(event)
|
||
|
case event
|
||
|
when "push"
|
||
|
"Webhook will triggered by a push to the repository"
|
||
|
when "tag_push"
|
||
|
"Webhook will be triggered when a new tag is pushed to the repository"
|
||
|
when "note"
|
||
|
"Webhook will be triggered when someone adds a comment"
|
||
|
when "issue"
|
||
|
"Webhook will be triggered when an issue is created/updated/merged"
|
||
|
when "merge_request"
|
||
|
"Webhook will be triggered when a merge request is created/updated/merged"
|
||
|
when "build"
|
||
|
"Webhook will be triggered when a build status changes"
|
||
|
when "wiki_page"
|
||
|
"Webhook will be triggered when a wiki page is created/updated"
|
||
|
end
|
||
|
end
|
||
|
|
||
|
def service_event_field_name(event)
|
||
|
event = event.pluralize if %w(merge_request issue).include?(event)
|
||
|
"#{event}_events"
|
||
|
end
|
||
|
end
|