Link an Issue to a Commit or Code Review
Linking issues to relevant commits, code reviews, or merge requests lets you access all the data related to an issue in a single click. You can view commit messages in issues and access issues from code reviews, which helps you track the work progress without switching tabs.
When you create a link between an issue and a commit or code review, these entities become bound and synched:
The issues linked to a code review are accessible from the respective code review page, and those that are linked to a commit are accessible from the commit list, and vice versa.
The code review status displayed on the issue page will be updated automatically when it's changed. Also, you'll get a notification to the issue chat when the merge request has been merged
When a linked commit is the last one in the branch, you can create a merge request right from the issue.
You can link issues to commits and code reviews in two ways:
By specifying a commit or code review on the issue page.
By mentioning an issue ID in the commit message or code review title.
To link an issue from the issue page:
Open the issue and click Link code changes:
Depending on what you want to link, choose the Commits or Code Reviews tab.
Select a commit or a code review from the list. To find the correct one you can:
filter commits by repository, author, branch, and date
filter code reviews and merge requests by state, repository, author, reviewer, branch, and date
Click the Link... button.
When an issue is linked to a commit, you can see the issue details right from the commit list. Select the commit then hover over the issue ID to immediately see the issue title, status, assignee and due date, or click on it to see more details on the pop-up screen:
And on the issue page you can see the linked commit as well:
Restrict linking issues to commits from specific branches
Commits that contain issue IDs in their commit messages are linked to referenced issues automatically. By default, Space monitors commits in all branches, but sometimes you may want to exclude references from specific branches to avoid clogging the issue history.
To choose which branches you want to monitor or ignore for references:
Navigate to your repository.
On the repository page, click Settings.
On the repository setting page, go to the Issue Links tab.
Spacify the branch name pattern. Use
-to exclude branches and
+to include. When nothing specified, Space will monitor and include references from all branches.