Jira will automatically scan a git repo and pull in commits that are tagged with a Jira ID (ie QA-244
).
Is there a way to display the links to Jira issues from with SourceTree:
Jira will automatically scan a git repo and pull in commits that are tagged with a Jira ID (ie QA-244
).
Is there a way to display the links to Jira issues from with SourceTree:
To make the commit text in SourceTree link to a GitHub Issue or Bitbucket Issue (standard issue tracker, similar to Jira), where the Issue is in the form "#1234", use this approach:
#(\d+)($|[^a-zA-Z0-9-])
(but see the Note below)<a href="https://bitbucket.org/your_username/your_project/issue/$1/">#$1</a>$2
(make sure you include the speech marks)https://bitbucket.org/your_username/your_project/issue/$1
Note: For step 6, you may consider using a regex like #(\d{1,4})($|[^a-zA-Z0-9-])
to prevent matching URLs that have "#numbers"
in them, like www.example.com/#123456
- More info here
Sources:
Apply the same links in JetBrains products
You can also have the same links in IntelliJ IDEA, Android Studio, PyCharm, etc, when viewing the "Version Control" tab for Git history:
IDE -> Preferences -> Search for "Issue Navigation" -> Add -> Enter regular the same expression and hyperlink. More info here.