You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: emails_helper.rb
    path of file: ./repos/gitlabhq/app/helpers
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module EmailsHelper
  include AppearancesHelper
  include SafeFormatHelper

  # Google Actions
  # https://developers.google.com/gmail/markup/reference/go-to-action
  def email_action(url)
    name = action_title(url)
    return unless name

    gmail_goto_action(name, url)
  end

  def action_title(url)
    return unless url

    %w[merge_requests issues commit].each do |action|
      if url.split("/").include?(action)
        return "View #{a
    
  def notification_reason_text(reason: nil, show_manage_notifications_link: false, show_help_link: false, manage_label_subscriptions_url: nil, unsubscribe_url: nil, format: :text)
    if unsubscribe_url && show_manage_notifications_link && show_help_link
      notification_reason_text_with_unsubscribe_and_manage_notifications_and_help_links(reason: reason, unsubscribe_url: unsubscribe_url, format: format)
    elsif !reason && manage_label_subscriptions_url && show_help_link
      notification_reason_text_with_manage_label_subscriptions_and_help_links(manage_label_subscriptions_url: manage_label_subscriptions_url, format: format)
    elsif show_manage_notifications_link && show_help_link
      notification_reason_text_with_manage_notifications_and_help_links(reason: reason, format: format)
    else
      notification_reason_text_without_links(reason: reason, format: format)
    end