500 error on activity feed, when deleted branch or repo is pushed was done
Summary: HTTP 500 error on activity feeds (dashboard, project view) in v7.3
Steps to reproduce: Remove existing branch or push to repo and try to access the dashboard or activity feed.
Expected behavior: Show the activity feed.
Observed behavior: An 500 error as the branch seems to need to be fetched and fails.
Relevant logs:
ActionView::Template::Error (undefined method `[]' for nil:NilClass):
1: - if show_last_push_widget?(event)
2: .event-last-push
3: .event-last-push-text
4: %span You pushed to
app/models/event.rb:186:in `branch?'
app/models/event.rb:257:in `last_push_to_non_root?'
app/helpers/application_helper.rb:125:in `show_last_push_widget?'
app/views/events/_event_last_push.html.haml:1:in `_app_views_events__event_last_push_html_haml___2437686736074306650_38485100'
app/views/groups/show.html.haml:4:in `_app_views_groups_show_html_haml__4009651433334491628_21676780'
app/controllers/groups_controller.rb:42:in `show'
Version of GitLab you are running: GitLab 7.3.0 76eaf55d
Describe your setup:
System information
System: Ubuntu 14.04
Current User: git
Using RVM: yes
RVM Version: 1.25.27
Ruby Version: 2.1.2p95
Gem Version: 2.2.2
Bundler Version:1.6.2
Rake Version: 10.3.2
Sidekiq Version:2.17.0
GitLab information
Version: 7.3.0
Revision: 76eaf55
Directory: /home/git/gitlab
DB Adapter: mysql2
URL: https://dev.*.eu
HTTP Clone URL: https://dev.*.eu/some-project.git
SSH Clone URL: git@dev.*.eu:some-project.git
Using LDAP: no
Using Omniauth: no
GitLab Shell
Version: 2.0.0
Repositories: /home/git/repositories/
Hooks: /home/git/gitlab-shell/hooks/
Git: /usr/bin/git