7

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?

mstrap
  • 16,808
  • 10
  • 56
  • 86

5 Answers5

5

As it seems that there currently is no such specification, I got that started:

https://github.com/mstrap/bugtraq

mstrap
  • 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
3

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
Richard
  • 14,798
  • 21
  • 70
  • 103
  • 1
    It's also possible to store this information inside the repository in `/.tgitconfig`. – MrTux Jan 29 '19 at 12:39
1

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.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • 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
-2

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.

mnagel
  • 6,729
  • 4
  • 31
  • 66
  • 1
    Actually, 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
-2

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)

Thomas Koch
  • 2,833
  • 2
  • 28
  • 36
  • 1
    Thanks 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