Show it as successful pipeline, rather than success pipeline

Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6342#note_16132150
This commit is contained in:
Lin Jen-Shin 2016-09-30 01:15:03 +08:00
parent 8dd580f402
commit 6bab69aa0c
2 changed files with 10 additions and 1 deletions

View File

@ -74,4 +74,13 @@ module NotificationsHelper
return unless notification_setting.source_type
hidden_field_tag "#{notification_setting.source_type.downcase}_id", notification_setting.source_id
end
def notification_event_name(event)
case event
when :success_pipeline
'Successful pipeline'
else
event.to_s.humanize
end
end
end

View File

@ -27,5 +27,5 @@
%label{ for: field_id }
= check_box("notification_setting", event, id: field_id, class: "js-custom-notification-event", checked: notification_setting.events[event])
%strong
= event.to_s.humanize
= notification_event_name(event)
= icon("spinner spin", class: "custom-notification-event-loading")