<commit_before>class SessionsController < Devise::SessionsController
  def create
    if env.key? 'omniauth.auth'
      identity = Identity.from_omniauth( env['omniauth.auth'] )
      sign_in identity.user
      session[:signed_in_with] = env['omniauth.auth']['provider']
      redirect_to root_path, flash: { notice: "You have logged in with an external service like GitHub, Facebook or Twitter and might have an account here already. If you would like to link your external service's identity with your existing account, then <a href='/users/edit'>visit your account page</a>." }
    else
      super
    end
  end
end<commit_msg>[#107] html_safe'ing a flash message<commit_after>class SessionsController < Devise::SessionsController
  def create
    if env.key? 'omniauth.auth'
      identity = Identity.from_omniauth( env['omniauth.auth'] )
      sign_in identity.user
      session[:signed_in_with] = env['omniauth.auth']['provider']
      notice = <<-EOC.strip_heredoc
        You have logged in with an external service like GitHub, Facebook or
        Twitter and might have an account here already. If you would like to
        link your external service's identity with your existing account, then
        <a href='/users/edit'>visit your account page</a>.
      EOC

      redirect_to root_path, flash: { notice: notice.html_safe }
    else
      super
    end
  end
end
{'fraction_non_alphanumeric': 0.08689355539464157, 'fraction_numerical': 0.002172338884866039, 'mean_word_length': 3.458064516129032, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3614711', 'n_tokens_mistral': 394, 'n_tokens_neox': 374, 'n_words': 135}