GFM : provide 'project' reference in comment

A project reference looks like gitlab-org/gitlab-ce>, and renders as gitlab-org/gitlab-ce.

We look for:

  • Any instances of a slash-separated string with no spaces, followed by a >.
    • This means we don't support shorthand project references, only full references.
  • If they match a project, we add a new project reference link.
  • As with all reference links, the text is not linked if you can't see the target.

Out of scope:

  • Shorthand references.
  • Autocomplete on the frontend.
  • Collapsing https://gitlab.com/gitlab-org/gitlab-ce in raw text to gitlab-org/gitlab-ce when rendered.

Original description

Description

Let's say I'm in group1/projecta and I want to provide a link to group2/projecta or even to group1/projectb (same namespace) in a comment.

Would be good to have a quick-typing way to do that, within a "begin typing" style like it's done with others GFM project references.

Proposal

to be discussed but I'm thinking of the input '&', like start typing '&proj' to suggest group1/projecta, group1/projectb, group2/projecta It has some security/scope implication by the way (we don't want to allow to mention a private group/project).

Links / references

https://docs.gitlab.com/ce/user/markdown.html

Edited by Sean McGivern