You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

setup_bugtraq.mkd 1.4KB

10 years ago
10 years ago
1234567891011121314151617181920212223242526272829303132333435
  1. ## Setting up Bugtraq
  2. *SINCE 1.4.0*
  3. [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.
  4. ### Why do I care?
  5. 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.
  6. ### How do I define the configuration?
  7. You add a *.gitbugtraq* file to the root of your repository on the default branch.
  8. This file is formatted like a standard Git config file. Here are some quick examples:
  9. [bugtraq "googlecode"]
  10. url = http://code.google.com/p/yourproject/issues/detail?id=%BUGID%
  11. logregex = "[Ii]ssues?:?(\\s*(,|and)?\\s*#?\\d+)+\n(\\d+)"
  12. [bugtraq "gerrit"]
  13. url = "https://git.eclipse.org/r/#q,%BUGID%,n,z"
  14. logregex = "Change-Id:\\s*(I[A-Fa-f0-9]{40})"
  15. [bugtraq "jira"]
  16. url = https://jira.atlassian.com/browse/%BUGID%
  17. logregex = (JRA-\\d+)
  18. [bugtraq "github"]
  19. url = "https://github.com/gitblit/gitblit/pull/%BUGID%"
  20. loglinkregex = "(?:pull request|pull|pr)\\s*[-#]?[0-9]+"
  21. logregex = "\\d+"
  22. loglinktext = "pull request #%BUGID%"