Git Integration With The Bug Genie On Windows
The project management software The Bug Genie has a useful module which integrates Version Control Systems (VCS) into its Issue Tracker to allow for source-code committals to be linked to tracked issues.
The process for setting up this module on Windows requires a number of undocumented modifications. In all honesty the modifications are so simple that I suspect most people make them without much deliberation, however in the hope of saving someone some time I have documented my process below.
The terse process I've documented is for setting up a local git repository with The Bug Genie v3.2.0 by using the PHP CLI method. All of which I did on Windows 7.
Set up The Bug Genie's git hook
Created 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"
Modified the file's contents so that the projectid and tbg_cli_path variables contained the correct values according their respective comment.
Prefixed the path to the PHP CLI executable on the line that calls The Bug Genie's CLI interface (the "tbg_cli" file).
Below is my modified post-receive file...
Removed POSIX dependancy
If you're using version 3.2.5 or higher then you don't need to do this step as my code changes were committed to the official The Bug Genie repository.
When the git-hook is executed it calls the PHP file named tbg_cli (located in The Bug Genie's main directory). Unfortunately this file has a dependency on the POSIX extension, which isn't available for the Windows OS
In order to stop this unfulfilled dependency from throwing errors I tracked down the POSIX dependent code to a static method named getCurrentCLIusername residing in "thebuggenie\core\classes\TBGContext.class.php" and changed the method to look like the following...
Once the aforementioned changes had been made I was able to push commits to my designated repository and have The Bug Genie display information about relevant commits.