Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Commit message linking to issue AND issue link to commit

Tags:

gitlab

How is it possible to linkg a commit message to issue AND the issue to the commits?

If I add in the commit message #123 it is a link to the issue, but on the issue there is no link to the commit.
Is this in any way possible to show the commit in the issue?

like image 594
chrisonline Avatar asked Feb 04 '17 17:02

chrisonline


2 Answers

Seems GitLab has now added this feature.

If you add to your commit message the issue id the commit number will be mentioned in the issue like this:
enter image description here

like image 184
chrisonline Avatar answered Oct 04 '22 14:10

chrisonline


This GitLab issue suggests:

Simply write the commit sha (in the issue) and it will be linked automatically!

However, this is not done automatically, which means adding an issue in a commit won't add the commit in the issue.

You might have to setup a post-reveive hook in order for that hook to:

  • detect a commit message a a reference to an issue
  • use GitLab API for Issues in order to add the commit SHA1 in the issue description.
like image 22
VonC Avatar answered Oct 04 '22 13:10

VonC