forked from davglass/github-trac
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
83 lines (53 loc) · 2.96 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
I have officially taken this project over, so all forks of this project should happen here not upstream.
======================================================================================================
Please file bug reports here:
http://davglass.lighthouseapp.com/projects/21212/home
======================================================================================================
This trac plugin is designed to accept a GitHub Post-Receive url.
It also allows you to replace the builtin Trac browser with redirects to the GitHub source browser.
More information about the Post-Receive Hook can be found here:
http://github.com/guides/post-receive-hooks
To install this Trac Plugin:
1. Clone the repository:
git clone git://github.com/davglass/github-trac.git
2. Install SimpleJSON:
easy_install simplejson
3. Install the Plugin:
cd github
sudo python setup.py install
4. Configure Trac by editing your trac.ini
[components]
github.* = enabled
[github]
apitoken = YOUR GITHUB API TOKEN
closestatus = closed (This is optional, defaults to closed
browser = http://github.com/davglass/tree/master
#Optional - perform a fetch on the local git repository
autofetch = true
5. Go to the Admin page for your project on GitHub. Then select the services tab.
Under the: Post-Receive URLs
Place a link to your Trac repository, in a format like this:
http://yourdomian.com/projects/projectname/github/APITOKEN
You can get your GitHub API token from your accounts page.
This is for your security, only those that know the API Token will able to post to this url
6. All done.
======================================================================================================
The commit hook is designed to close or mark tickets that are attached to a commit message.
It searches commit messages for text in the form of:
command #1
command #1, #2
command #1 & #2
command #1 and #2
Instead of the short-hand syntax "#1", "ticket:1" can be used as well, e.g.:
command ticket:1
command ticket:1, ticket:2
command ticket:1 & ticket:2
command ticket:1 and ticket:2
======================================================================================================
The Code Browser
The code browser portion of the plugin is designed to replace the code browser built into Trac with a
redirect to the GitHub source browser.
In order for this to work properly, you still need to have Trac set to show a git repository. Turning this off
will not show source control links in other places (timeline). This git repository needs to be a synced clone of
your GitHub repository. Trac requires the GitPlugin in order to show a Git Repository: http://trac-hacks.org/wiki/GitPlugin
This plugin will attempt to intercept the /browser and /changeset url's and redirect you to the proper GitHub url.