gitlab-org--gitlab-foss/app/helpers/services_helper.rb

30 lines
1 KiB
Ruby
Raw Normal View History

module ServicesHelper
def service_event_description(event)
case event
when "push"
2016-07-13 15:49:47 -04:00
"Event will be triggered by a push to the repository"
when "tag_push"
2016-07-13 15:49:47 -04:00
"Event will be triggered when a new tag is pushed to the repository"
when "note"
2016-07-13 15:49:47 -04:00
"Event will be triggered when someone adds a comment"
when "issue"
"Event will be triggered when an issue is created/updated/closed"
when "confidential_issue"
"Event will be triggered when a confidential issue is created/updated/closed"
when "merge_request"
2016-07-13 15:49:47 -04:00
"Event will be triggered when a merge request is created/updated/merged"
when "build"
2016-07-13 15:49:47 -04:00
"Event will be triggered when a build status changes"
when "wiki_page"
2016-07-13 15:49:47 -04:00
"Event will be triggered when a wiki page is created/updated"
when "commit"
"Event will be triggered when a commit is created/updated"
end
end
def service_event_field_name(event)
event = event.pluralize if %w[merge_request issue confidential_issue].include?(event)
"#{event}_events"
end
end