Make commit message appear as comment in bitbucket

2020-02-14 07:53发布

问题:

Is there a way to make bitbucket show commit messages as part of comments/activity related to a specific issue, whenever it's been marked-up in said message; the same way github does?

Thanks.

回答1:

Issues, pull requests, users and commit hashes can be linked in BitBucket issues and commit messages.

Issues can be closed automatically by including something like resolves #123. Commits referencing issue 123 will generate a cross-reference in the issue. This relies on the issues hook to be enabled, which is done by default on new (after August, 2012) issues-enabled repositories.



回答2:

A little more specific to this, as I had the issue where I was putting issues into my commits, ala "issue #89" which gave me links from the commit into the issue, but not vice versa. Finally found that only a specific set of commands would cause the issue to cross-reference to the commit. This issue led to this guide of actions:

so if I use "ref bug #89", then I got the links and cross referencing in the commit and issue i was looking for.