gitlab-org--gitlab-foss/app/views/events/_event_push.atom.haml
Yorick Peterse b4aaced71a
Fix display of push events for removed refs
This changes the style of push events that remove tags or branches so
they don't display the commit details. This prevents displaying commit
details such as:

    000000 . --broken encoding

Instead we now simply display the header such as:

    Administrator deleted branch example-branch

This is displayed in the same style as events for newly created
branches/tags.

This commit also ensures that if no commit message is present we simply
don't display anything, instead of "--broken encoding".

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/36685
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/36722
2017-08-22 20:15:45 +02:00

14 lines
521 B
Text

%div{ xmlns: "http://www.w3.org/1999/xhtml" }
%p
%strong= event.author_name
= link_to "(#{truncate_sha(event.commit_id)})", project_commit_path(event.project, event.commit_id)
%i
at
= event.created_at.to_s(:short)
- unless event.rm_ref?
%blockquote= markdown(escape_once(event.commit_title), pipeline: :atom, project: event.project, author: event.author)
- if event.commits_count > 1
%p
%i
\... and
= pluralize(event.commits_count - 1, "more commit")