I'm looking for a specification or guidelines on how a Git client should integrate with bug tracking systems. For SVN, there are bugtraq:
-properties. Is there something similar for Git?

- 16,808
- 10
- 56
- 86
5 Answers
As it seems that there currently is no such specification, I got that started:

- 16,808
- 10
- 56
- 86
-
Interesting. +1. More detailed that my "git notes" proposal in my own answer. – VonC Oct 03 '13 at 05:52
-
"git notes" have been mentioned in the mailing list thread as well: http://www.spinics.net/lists/git/msg218408.html ... I'm not sure what the client will be required to do, if we store bugtraq information in notes. If you have a proposal, feel free to comment the current specification or send me some pull request. – mstrap Oct 03 '13 at 12:26
You can put this in your /.git/config file to work with TortoiseGit:
[bugtraq]
url = http://jira.com:8080/browse/
number = false
warnifnoissue = true
message = http://jira.com:8080/browse/%BUGID%
label = Issue number
append = false

- 14,798
- 21
- 70
- 103
-
1It's also possible to store this information inside the repository in `/.tgitconfig`. – MrTux Jan 29 '19 at 12:39
One way would be to use git notes
(which I detail here), in order to store on top of any regular commit a 'bugtrag
' note (in a notes/bugtraq
namespace for instance).
That would allow an integration without rewriting the git repo history of commits already present.
-
Why duplicate the information - usually the commit message already contains the issue number. – Thomas S. Jul 09 '13 at 12:06
-
OK, that's the way it could be stored. Though I think the commit message is sufficient (like it is in SVN). So I'm actually looking for a specification on *how to interpret* a commit message and extract issue IDs. Or how and where to store the URL of the issue tracker. Both is done using svn:bugtraq properties. If there is no counterpart in Git, maybe I should take this discussion to the Git mailing list? – mstrap Jul 09 '13 at 12:07
-
1@mstrap you put put any information you want in git notes. You can keep the issue ID in the commit message, and set the issue tracker url in a git notes. But there isn't a "standard" way of interfacing git with a bug tracker. – VonC Jul 09 '13 at 12:15
integration of bug trackers with git usually works by parsing the git commit messages in the bug tracker.
i.e. you mention "fixes #1234" or "relates #1332" in your message and the bug tracker establishes the connection.

- 6,729
- 4
- 31
- 66
-
1Actually, I'm looking for the reverse direction: the Git client should start the interaction with the issue tracker. – mstrap Jul 09 '13 at 12:04
There's seldom a question that has not been asked before. There already is a popular standard for project information like the link to a bugtracker and much more: https://en.wikipedia.org/wiki/DOAP (Description of a Project)

- 2,833
- 2
- 28
- 36
-
1Thanks for the link, though I doubt DOAP will be applicable for this use case (or just for a fraction of what needs to be done). Have a look at TortoiseSVN's bugtraq documentation or https://github.com/mstrap/bugtraq. Specifying the interaction between a Git client and an issue tracker is more than storing an URL. – mstrap Oct 04 '13 at 14:12