2

Git integration with The Bug Genie

The Bug Genie is a very powerful bug tracker system in PHP, as good as redmine in ruby. So I decided to integration my git server into buggenie (v3.2.6).

  1. after created a project, go to project settings ->  VCS integration.
    • set Enable VCS Integration to “enable for commits applying to existing issues only”
    • enable workflow is you wish
    • access method set to Direct Access
    • set your repo url (root url), in this example, I will use GitList
    • Commit details page set to “/commit/%revno%
    • file log page set to “/commits/%revno%/%file%
    • file blob/view page set to “/blob/%revno%/%file%
    • diff page set to “/blame/%revno%/%file%” (I didn’t find any better way with gitlist)
  2. create a symbolic link in the git repository’s “hooks” directory with the name “post-receive” which pointed to the file named “tbg-post-receive” in “thebuggenie\modules\vcs_integration\hooks\git”, set permission to +x, and modify the content.

    in file post-receive, modify projectid (found in project setting), tbg_cli_path (your buggenie root path), make file path/to/buggenie/tbg_cli executable
  3. you should now be able to commit. If you encounter such error while commit:

    you have to modify file /modules/mailing/classes/TBGMailing.class.php, around line 644, replace

    by this
  4. for how to commit with ticket id, see the official wiki

Darktalker

2 Comments

  1. Hi there, thanks for this blog post.
    I have followed the steps here to try TBG integration with Git. To start with, I am running TBG on localhost, and also using a local Git repository.

    I do not get any errors, but the git commit doesn’t automatically mark the TBG issue as fixed. What are some “gotchas” to look for to resolve the problem?

    I assume the repo URL is of the form file:/// [For example, file:////home/usr/someone/gitrepo/someproject — notice 4 slashes after file:] Is this incorrect?

  2. have you created the symbolic link ? your git repo should be a bare repo

    mkdir test_repo.git
    cd test_repo.git
    git --bare init
    cd hooks
    ln -s path/to/buggenie/modules/vcs_integration/hooks/git/tbg-post-receive post-receive

    then in the post-receive, you must indicate the projectid

    vi post-receive
    #then edit projectid=1

Leave a Reply