Commit message linking to issue AND issue link to commit

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


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.

Tags:

Gitlab