Resolve issues automatically when users push code
You can configure Bitbucket Cloud to resolve tickets automatically when people push updates through to your Bitbucket Cloud repository. Users specify commands and issues in a commit message, for example:
hg commit -m "fixes #6, resolve ticket #5 and see ticket #9 and ticket #5 in the tracker"
On Bitbucket, the commit message appears with links to each issue:
When you transition an issue with a commit message, the system cross-references the commit from the issue:
Adding the Issue Hook Manually
You only need to perform this procedure if your repository has an issue tracker enabled but does not have an Issue issue on the repository.
- Go to the repository's settings.
- Click Hooks in the left-hand navigation.
The hook page appears.
- Select the Issues hook from the Hook dropdown.
Click Add hook.
A new section appears for the Issues hook.
- Press Save.
The page remains unchanged but the hook is started.
Including Issues in a Commit Message
You can link to a single issue or multiple issues. The
<issue id> can take an of the following forms:
You should always include the # (pound sign or hash mark) if you to ensure that links back to the issue resolve. If you omit the # (pound sign or hash mark), links from a changeset do not resolve.
Each action supports multiple
<command> keywords. The following table lists the actions you can perform through a commit and the acceptable commands for that action. All the keywords are case insensitive. So, for example, both
Close work to close an issue.
|resolve an issue||
|reopen an issue||
|mark an issue on hold||
|mark an issue wontfix||
|mark an issue invalid||
|link to a changeset for the issue||
re bug #55
Was this helpful?
Thanks for your feedback!