Home > goplan-hooks

goplan-hooks

Goplan-hooks is a project mainly written in Ruby, it's free.

Closes GoPlan tickets with Github commits

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
Previous:team321