Paul Martin
2016-04-30 a502d96a860456ec5e8c96761db70f7cabb74751
commit | author | age
d02011 1
JM 2 ## Setting up Bugtraq
3
4 *SINCE 1.4.0*
5
6 [Bugtraq](https://github.com/mstrap/bugtraq) is a specification started by Syntevo & supported by Gitblit to establish a standard to define and parse commit messages for linkable text.
7
8 ### Why do I care?
9
10 It's a portable way for your repository to have linkable issue, pull request, change-id, etc text fragments.  SmartGit/Hg and Gitblit both use the reference implementation available in the aforementioned Github project so if you configure Bugtraq for one you automatically get linked text in the other.
11
12 ### How do I define the configuration?
13
14 You add a *.gitbugtraq* file to the root of your repository on the default branch.
15
16 This file is formatted like a standard Git config file.  Here are some quick examples:
17
18     [bugtraq "googlecode"]
19         url = http://code.google.com/p/yourproject/issues/detail?id=%BUGID%
20         logregex = "[Ii]ssues?:?(\\s*(,|and)?\\s*#?\\d+)+\n(\\d+)"
21     
22     [bugtraq "gerrit"]
23         url = "https://git.eclipse.org/r/#q,%BUGID%,n,z"
24         logregex = "Change-Id:\\s*(I[A-Fa-f0-9]{40})"
25     
26     [bugtraq "jira"]
9bd0f2 27         url = https://jira.atlassian.com/browse/%BUGID%
d02011 28         logregex = (JRA-\\d+)
JM 29
30     [bugtraq "github"]
31         url = "https://github.com/gitblit/gitblit/pull/%BUGID%"
32         loglinkregex = "(?:pull request|pull|pr)\\s*[-#]?[0-9]+"
33         logregex = "\\d+"
34         loglinktext = "pull request #%BUGID%"
35