Show last push widget in upstream after push to fork

This commit is contained in:
Drew Blessing 2016-06-23 09:36:24 -05:00
parent 7144867326
commit 0b34cac1c5
3 changed files with 9 additions and 2 deletions

View file

@ -28,6 +28,7 @@ v 8.10.0 (unreleased)
- PipelinesFinder uses git cache data
- Throttle the update of `project.pushes_since_gc` to 1 minute.
- Check for conflicts with existing Project's wiki path when creating a new project.
- Show last push widget in upstream after push to fork
- Don't instantiate a git tree on Projects show default view
- Bump Rinku to 2.0.0
- Remove unused front-end variable -> default_issues_tracker

View file

@ -293,7 +293,11 @@ module ProjectsHelper
end
def last_push_event
if current_user
return unless current_user
if fork = current_user.fork_of(@project)
current_user.recent_push(fork.id)
else
current_user.recent_push(@project.id)
end
end

View file

@ -7,7 +7,9 @@
%span You pushed to
= link_to namespace_project_commits_path(event.project.namespace, event.project, event.ref_name) do
%strong= event.ref_name
branch
- if @project && event.project != @project
%span at
%strong= link_to_project event.project
#{time_ago_with_tooltip(event.created_at)}
.pull-right