This is a simplified version (= no dependencies) of the Trac/Github integration plugin http://github.com/davglass/github-trac
- No additional dependencies
- Get Timeline from the Git repository
- Redirect code browsing and changeset viewing to Github (for Git changesets)
commit:e6eafdsyntax in Wiki for easy links to commits
This plugin allows you to replace the builtin Trac browser with redirects to the GitHub source browser.
To install this Trac Plugin:
Clone the repository:git clone git://github.com/pv/githubsimple-trac.git
Install the Plugin:cd githubsimple-trac sudo python setup.py install # ... or something similar
Configure Trac by editing your
trac.ini:[components] githubsimple.* = enabled [githubsimple] browser = http://github.com/davglass/tree/master # your Github URL suppress_changesets = true local_repo = /path/to/local/repo # optional secret_token = somesecretword # optional
(Optional) Clone your Git repo to some path in your Trac server, if you specified
(Optional) Configure Github Post-Receive URL to:http://your.trac.domain/someproject/github/somesecretword
somesecretworkshould match what's in
trac.ini. This will only invoke
git fetchon the
local_reposo that the timeline view stays up to date.
The code browser portion of the plugin is designed to replace the code browser built into Trac with a simple redirect to the GitHub source browser.
This plugin intercepts the /changeset url, which allows using:
syntax in referring to Git commits.
It tries to automatically detect if the commit is a valid SVN revision number, and in that case points it to Trac's builtin source browser instead of Github. (May be useful for projects converted from SVN...)
You can set the
suppress_changesets option to suppress SVN changesets in
the Timeline view.
secret_token to get the Git commit log
from a local repository. (Note that this mode has no caching -- it'll
git for each request, which you may need to remember if your
server is heavily loaded.)