Hi Backlog users,
Previously, we shared about the Usefulness of Issue Key as a way to reference and link to issues within Backlog.
Today, we shall share about how issue keys can be useful for Backlog’s Git functions.
Comment on issue via issue key in Git commit message
Do you know that you can comment on Backlog issues using your Git commit messages? First, we need to enable it under Project Settings>Git Settings.
Make sure the checkbox is ticked for ‘Connect issue references and log keywords’.
Then, when you include the issue key in your Git commit messages, the commit message will be added as a comment on the issue.
For example, the Git commit command with message:
$ git commit -m “NUBLOG-145 Fix typo done”
When this commit is pushed to Backlog’s Git repository, it will add a comment on the issue:
Isn't this convenient for commenting on issues? You don't even need to open the Backlog issue to type in your comment.
Link Git branch/Pull Requests with related issues
When you include an issue key in the Git branch name, it will automatically associate the related issue with the branch.
In Nulab for example, if it’s a project with key ‘NUBLOG’, the project issues will be in the format: NUBLOG-001 or NUBLOG-123 (according to which issue number it is.)
When working on an issue, our developers will create a Git branch with the name format: ‘issue key/title’. Such as:
When a pull request is being created, the issue is automatically related to the PR. You can also add any other issue keys in the description as links to them.
After submitting the pull request, this is how it looks below.
The reviewer can easily click on the issue keys to go to the related issues in the project.
At the issue’s display page, it will show the related pull requests, their status (3 merged out of 4), and whether they are added or merged.
This is a great way to keep track of issues!
So, to summarize for today, we’ve learned about the usefulness of issue keys in the following ways:
- Include issue key in Git commit message to comment on issues
- Include issue key in Git branch names to link to the related issue
- Include issue key in Pull Request descriptions to link to related issues.
We recommend these techniques as they are convenient for tracking your code changes with reference to issues or tasks in Backlog. And it's also great for documenting the work you've done.
Do you have a tip about using issue keys or Git in Backlog? Do share with us!
Please sign in to leave a comment.