Create a system note for the cc command
What does this MR do?
This MR creates a system note for the cc slash command. It is a first step in implementing the ideas discussed in https://gitlab.com/gitlab-org/gitlab-ce/issues/24615.
Are there points in the code the reviewer needs to double check?
I am not 100% sure of the names of the methods. I settled on cc_user
for now. The issue is that the action "to cc" sounds odd when compared with other actions (e.g "to subscribe/mention").
I settled on placing cc_user
in IssuableBaseService#update
because that way it could be used by both Issues::UpdateService
and MergeRequests#UpdateService
. Additionally I placed it close to other methods that reply on attributes present in params
which need to be removed before the #update_issuable
method. Let me know if there is a more appropriate location for the logic.
With this PR a system note is added but the referenced users aren't added as participants to the issue/MR or notified of that. Therefore, this probably can't be merged before the /cc slash command gets that behaviour in order to avoid confusion to users.
I added a couple of tests. Let me know if there is any layer of testing missing.
Why was this MR needed?
To turn a common idiom in Gitlab, "cc the_user_handle", into a first class citizen. More details can be found at: https://gitlab.com/gitlab-org/gitlab-ce/issues/24615
Screenshots (if relevant)
N/A
Does this MR meet the acceptance criteria?
-
Changelog entry added -
Documentation created/updated -
API support added - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together -
Decide if there is anything missing from the feature -
Decide if code is OK
What are the relevant issue numbers?
24615