WIP: Adds support for special @@ mentions
What does this MR do?
It adds support for special @@
mentions. For instance access/role/permission groups like @@owners
,
@@developers
, etc, and special groups like @@participants
and assignees
(of a merge request or an issue).
Are there points in the code the reviewer needs to double check?
- TODO in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/17999/diffs#0bd48a56d16d37de4f217167cec8b7610a9c1403_107_130 line
- When a participant is also the assignee, calling
MergeRequest#participants
orIssue#participants
raisesstack level too deep error
. Any ideas?
Why was this MR needed?
This MR implements a feature request described in #33540 (moved).
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added -
Tests added for this feature/bug - Review
-
Has been reviewed by UX -
Has been reviewed by Frontend -
Has been reviewed by Backend -
Has been reviewed by Database
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together -
Internationalization required/considered -
End-to-end tests pass ( package-and-qa
manual pipeline job)
What are the relevant issue numbers?
Closes #33540 (moved)
Notes
To recap the completeness state of the MR at this point (Apr 16, 2018) I think it misses the following:
-
Tests for the new @@
usage in cases other than Issues and Merge Requests. This tests will reveal what additional behaviour is missing. -
A clean way to pass context data (e.g. the noteable pointer) in the filter class. -
Find out what alternative context data are needed (if any) in the cases where the Noteable is not available. -
Modify/add tests for asserting e-mail and web notifications are going out to the intented users in the cases of @@
mentions. -
Resolve the "Stack level too deep" error. -
Finally, when all is in place and working, extract all new @@
related functionality into new filter and parser classes. -
Add the newly supported handles in the autocomplete list on client side. -
There a broken spec spec/features/issues/spam_issues_spec.rb
, but I could not figure out why.
Edited by Ilias Spyropoulos