Crosslinking Issues
Please read through the GitLab Issue Documentation for an overview on GitLab Issues.
From Commit Messages
Every time you mention an issue in your commit message, you’re creating a relationship between the two stages of the development workflow: the issue itself and the first commit related to that issue.
If the issue and the code you’re committing are both in the same project,
you simply add #xxx
to the commit message, where xxx
is the issue number.
If they are not in the same project, you can add the full URL to the issue
(https://gitlab.com/<username>/<projectname>/issues/<xxx>
).
git commit -m "this is my commit message. Ref #xxx"
or
git commit -m "this is my commit message. Related to https://gitlab.com/<username>/<projectname>/issues/<xxx>"
Of course, you can replace gitlab.com
with the URL of your own GitLab instance.
Note: Linking your first commit to your issue is going to be relevant for tracking your process far ahead with GitLab Cycle Analytics). It will measure the time taken for planning the implementation of that issue, which is the time between creating an issue and making the first commit.
From Related Issues
Mentioning related issues in merge requests and other issues is useful for your team members and collaborators to know that there are opened issues around that same idea.
You do that as explained above, when mentioning an issue from a commit message.
When mentioning the issue “A” in issue “B”, the issue “A” will also display a notification in its tracker. The same is valid for mentioning issues in merge requests.
From Merge Requests
Mentioning issues in merge request comments works exactly the same way as they do for related issues.
When you mention an issue in a merge request description, it will simply link the issue and merge request together. Additionally, you can also set an issue to close as soon as the merge request is merged.
Close an issue by merging a merge request
To close an issue when a merge request is merged, use the automatic issue closing pattern.
Help and feedback
If there's something you don't like about this feature
To propose functionality that GitLab does not yet offer
To further help GitLab in shaping new features
If you didn't find what you were looking for
If you want help with something very specific to your use case, and can use some community support
POST ON GITLAB FORUM
If you have problems setting up or using this feature (depending on your GitLab subscription)
REQUEST SUPPORT
To view all GitLab tiers and features or to upgrade
If you want to try all features available in GitLab.com
If you want to try all features available in GitLab self-managed
If you spot an error or a need for improvement and would like to fix it yourself in a merge request
EDIT THIS PAGE
If you would like to suggest an improvement to this doc