Skip to content

Unapproved merge request e-mails failing with missing required keys: [:username]

https://sentry.gitlap.com/gitlab/gitlabcom/issues/34276/

ActionController::UrlGenerationError: No route matches {:action=>"show", :controller=>"users", :username=>nil} missing required keys: [:username]
  app/views/notify/unapproved_merge_request_email.html.haml:133:in `_app_views_notify_unapproved_merge_request_email_html_haml__633509356381538151_70188058110260'
    %a.muted{ href: user_url(@merge_request.assignee), style: "color:#333333;text-decoration:none;" }
  app/mailers/notify.rb:132:in `mail_thread'
    mail(headers)
  app/mailers/notify.rb:160:in `mail_answer_thread'
    mail_thread(model, headers)
  app/mailers/emails/merge_requests.rb:68:in `unapproved_merge_request_email'
    mail_answer_thread(@merge_request, merge_request_thread_options(unapproved_by_user_id, recipient_id))
  lib/gitlab/metrics/instrumentation.rb:156:in `block in unapproved_merge_request_email'
    trans.method_call_for(#{label.to_sym.inspect}).measure { super }
...
(139 additional frame(s) were not displayed)

ActionView::Template::Error: No route matches {:action=>"show", :controller=>"users", :username=>nil} missing required keys: [:username]

No route matches {:action=>"show", :controller=>"users", :username=>nil} missing required keys: [:username]