Detect and link references to commits/issues/users/etc. in commits/comments/etc. (feature request) #527

riyad opened this Issue Mar 7, 2012 · 22 comments


None yet
riyad commented Mar 7, 2012

It would be nice if there was a scheme of references that would be recognized and linked accordingly by Gitlab.

It would be quite useful and its application would be quite universal.

Github's GitHub Flavored Markdown would probably be a good start for an idea on how to implement such a feature.

Example formats:
1234567 would link to commit 1234567
@foo would link to the respective user
!123 would link to a issue
#123 would link to a merge request

[foo] would link to the wiki page
&foo would link to/embed an attachment
$foo would link to/embed a snippet

Usage examples:
"Fixes !123" in a commit message
"This has already been fixed by @foo in #123" in an issue note
"You should ask @foo" in a note
"Installation instructions have been updated accordingly in [Install_on_Windows]" in an issue note
"RTL layout is borked (see &1234567_rtl_layout_fail.jpg)" in an issue
"Then use the database update script $" in a wiki page or an issue note
... use your imagination ;)

Further ideas:

  • notify users when they have been mentioned somewhere
  • automatically add a "Fixed in 1234567" to an issue when there is a "Fixes !123" in a commit message
ariejan commented Mar 15, 2012

+1 for this.



chibani commented Mar 15, 2012

+1 would be great


Love this.

cboden commented Apr 13, 2012


kitop commented Apr 27, 2012

+1 for this, would be really helpful
I prefer #123 for issues and !123 for merge requests, as we mantain compatibily with github and people don't get messed when switching.

ManuelAC commented May 2, 2012

👍 I agree with @kitop, use #[0-9]+ for issues and ![0-9]+ for merge requests.

therma commented Jul 10, 2012


eropple commented Jul 18, 2012



Would love that too!

riyad commented Aug 19, 2012

Current Status

since #1183 you can use Github Flavored Markdown to link to

  • issues (#123)
  • merge request (!123)
  • commits (1234567)
  • team members (@foo)
  • snippets ($123)


  • commit messages
  • notes/comments/wall posts
  • issues
  • merge requests
  • milestones
  • wiki pages

For now it will just show a tooltip with some info about the linked item when hovering over the link.
Also thanks to #1198 previews are available while editing. :)

What still needs to be done

  • linking to notes/attachments (let's say it's complicated)
  • fancy styling (ideas and help appreciated)
  • making it more discoverable and improving docs/help
  • automated actions or notifications (this will be tough)

So between @jaypikay's [] comment on #1170

and #1183 you can get very close to github and redmine on this

Nice work guys!

Can't wait until this feature makes it in.

Let me know if anyone needs a tester. I've got it running on postgres also

svoctor commented Nov 21, 2012

+1 on this!


@riyad What's so complicated about linking to a commit with a note?

We can add a note like this: "commit (SHA) MESSAGE" or something like that. The only problem I see is when the commit author is not a Gitlab user.

riyad commented Dec 4, 2012

related: #2161, #2169

riyad commented Dec 4, 2012

Closing this ... anything beyond the current state deserves a separate issue.

@riyad riyad closed this Dec 4, 2012
scopium commented Dec 19, 2012

if the developers open up more functionality for the PUT Api call.. i can get this whole commiting with refs , fixes done in a day.

API call to write comment on an issue,
API call to pass the userid instead of their key
would be the basic

dosire commented Oct 2, 2013

Available in GitLab 6.1

dosire commented Jan 21, 2014

By the way, you can customize the pattern in

By default the pattern can be anywhere in the commit message, it doesn't need to be at the start anymore.

inetbiz commented May 6, 2014

I would like to cite wiki pages in issues. I don't see how unless I link the FULL URL.

dosire commented May 6, 2014

@inetbiz Yes, you need the full url

@maxlazio maxlazio added a commit that referenced this issue Oct 7, 2014
@maxlazio maxlazio Merge branch 'remove-annoying-i18n-deprecation' into 'master'
Remove annoying i18n deprecation

Thanks to this guy

Fixes #527

See merge request !197
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment