Mentioning user in issue does not work for usernames starting with a number
Created by: ghost
- Summary: Mentioning a user by @username in a gitlab issue does not actually add this user to the issue participants and does not make the @username a link to the user profile for usernames starting with a number, such as 3G1234567, on gitlab version 7.7.2.
- Steps to reproduce: Register a user with a username such as 3G1234567, and have another user create an issue referencing 3G1234567 using @3G1234567.
- Expected behavior: The "@3G1234567" in the issue text will become a clickable link to the user's profile, 3G1234567 will be added to the issue participants, and 3G1234567 will be notified that he was mentioned in an issue.
- Observed behavior: The "@3G1234567" in the issue text will not be a link, and 3G1234567 is not notified nor is he added to the issue participants.
We tried to fix it by changing the regular expression in https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/gitlab/markdown.rb#L124 to NAME_STR = '[a-zA-Z0-9_-.]*', which makes the username clickable, but does not add the user to the issue participants.