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
Return a non-html-safe, unescaped String instead of ActiveSupport::SafeBuffer
to preserve safety when the output is misused. Currently there's oly one user,
which does the right thing.
Closes#23311
Also preserve code preview color scheme in events dashboard.
Assign default colors to all code blocks shown as <pre class="code highlight [color_scheme]">
Closes#1139
Update the `#first_line_in_markdown` method so that the first line of
parsed text is displayed more reliably, and the continuation indicators
("...") are displayed in all cases where the note is truncated.
Also add Rspec tests for `EventsHelper#event_note`.