Use same format for chat messages
Problem to solve
Currently all chat messaged have a different format, it is not comfortable to read notifications and just not nice. Especially for messages that begin with the project name when I would like to first see the user name.
Further details
I took sample messages from the specs:
[<http://somewhere.com|project_name>] Issue opened by Test User (test.user)
[<http://somewhere.com|project_name>] Issue <http://url.com|#100 Issue title> closed by Test User (test.user)
[<http://somewhere.com|project_name>] Issue <http://url.com|#100 Issue title> opened by Test User (test.user)
Test User (test.user) opened <http://somewhere.com/merge_requests/100|!100 *Merge Request title*> in <http://somewhere.com|project_name>: *Merge Request title*
Test User (test.user) closed <http://somewhere.com/merge_requests/100|!100 *Merge Request title*> in <http://somewhere.com|project_name>: *Merge Request title*
Test User (test.user) <http://url.com|commented on commit 5f163b2b> in <http://somewhere.com|project_name>: *Added a commit message*
Test User (test.user) <http://url.com|commented on merge request !30> in <http://somewhere.com|project_name>: *merge request title*
Test User (test.user) <http://url.com|commented on issue #20> in <http://somewhere.com|project_name>: *issue title*
Test User (test.user) <http://url.com|commented on snippet $5> in <http://somewhere.com|project_name>: *snippet title*
<http://example.gitlab.com|project_name>: Pipeline <http://example.gitlab.com/pipelines/123|#123> of branch <http://example.gitlab.com/commits/develop|develop> by The Hacker (hacker) #{status_text} in 02:00:10
test.user pushed to branch <http://url.com/commits/master|master> of <http://url.com|project_name> (<http://url.com/compare/before...after|Compare changes>)
test.user pushed new tag <http://url.com/commits/new_tag|new_tag> to <http://url.com|project_name>
test.user pushed new branch <http://url.com/commits/master|master> to <http://url.com|project_name>
test.user removed branch master from <http://url.com|project_name>
Test User (test.user) created <http://url.com|wiki page> in <http://somewhere.com|project_name>: *Wiki page title*
Test User (test.user) edited <http://url.com|wiki page> in <http://somewhere.com|project_name>: *Wiki page title*
Some messages begin with the name of the projects, some with a username (also in different formats). If it not indented to be so, I propose to bring to a common format.
Proposal
For example:
# Use same format as merge requests. `opened` -> `reopened` for reopen case.
Test User (test.user) opened issue in <http://somewhere.com|project_name>
Test User (test.user) closed issue <http://url.com|#100 *Issue title*> in <http://somewhere.com|project_name>
Test User (test.user) reopened issue <http://url.com|#100 *Issue title*> in <http://somewhere.com|project_name>
# Remove double title (should be done in #44586). Add `merge request` before URL.
Test User (test.user) opened merge request <http://somewhere.com/merge_requests/100|!100 *Merge Request title*> in <http://somewhere.com|project_name>
Test User (test.user) closed merge request <http://somewhere.com/merge_requests/100|!100 *Merge Request title*> in <http://somewhere.com|project_name>
# Move titles into URL.
Test User (test.user) <http://url.com|commented on commit 5f163b2b *Added a commit message*> in <http://somewhere.com|project_name>
Test User (test.user) <http://url.com|commented on merge request !30 *merge request title*> in <http://somewhere.com|project_name>
Test User (test.user) <http://url.com|commented on issue #20 *issue title*> in <http://somewhere.com|project_name>
Test User (test.user) <http://url.com|commented on snippet $5 *snippet title*> in <http://somewhere.com|project_name>
# Move project link to end. Not sure is it possible and required to start from username.
Pipeline <http://example.gitlab.com/pipelines/123|#123> of branch <http://example.gitlab.com/commits/develop|develop> by The Hacker (hacker) #{status_text} in 02:00:10 [<http://example.gitlab.com|project_name>]
# Use combined name.
Test User (test.user) pushed to branch <http://url.com/commits/master|master> of <http://url.com|project_name> (<http://url.com/compare/before...after|Compare changes>)
Test User (test.user) pushed new tag <http://url.com/commits/new_tag|new_tag> to <http://url.com|project_name>
Test User (test.user) pushed new branch <http://url.com/commits/master|master> to <http://url.com|project_name>
Test User (test.user) removed branch master from <http://url.com|project_name>
# Put `wiki_page` before the link. Move title from end to link test.
Test User (test.user) created wiki page <http://url.com|*Wiki page title*> in <http://somewhere.com|project_name>
Test User (test.user) edited wiki page <http://url.com|*Wiki page title*> in <http://somewhere.com|project_name>
Attention notes:
- Maybe there are some parsers that can break
- For some to see at the beginning the project name may be more important than username
- People who are used to the old format may be unhappy
What does success look like, and how can we measure that?
Notification messages will become cleaner and more understandable. WDYT?