/
README
42 lines (30 loc) · 1.26 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
This app is a small server to act as a GitHub Post-Receive hook to close tickets
in GoPlan projects.
http://goplanapp.com/
Hook will live at http://example.com/project_alias/github
I took inspiration from Github's own awsome Post-Receive service
http://github.com/pjhyett/github-services/
This very simple hook looks for a pattern in commit messages:
[Closes #ticket_number]
Current behavior closes the referred ticket and adds a comment like so:
Closed.
http://github.com/defunkt/github/commit/41a212ee83ca127e3c8cf465891ab7216a705f59
GoPlan API uses OAuth to handle authentication.
Register an application with GoPlan to obtain consumer key and secret.
http://goplanapp.com/oauth_clients/new
Before deploying the app run goplan-auth to create a goplan.yml file with your credentials.
Template for goplan.yml file is as follows:
---
:company_alias:
:consumer_key:
:consumer_secret:
:access_token:
:access_token_secret:
It might look too much for just the given task, but I decided to take advantage of the
modular structure of github-services in case I wanted to add more web hooks to
interact with other areas of GoPlan projects (Discussions, Tasks, Time Tracking),
and handling different kinds of payloads from different services.
You need:
- sinatra
- oauth
- json