Skip to content

chocolatey-archive/chocolatey-webhooks

 
 

Repository files navigation

Chocolatey WebHooks

WIP - Customizations of Puppet-WebHooks

Build Status

chocolatey-webhooks acts as a relay from Github and other services to Jira and Trello, so that events on a Github project automatically create and update Jira issues or Trello cards.

Event sources

Right now the primary source of events is Github. The following events can be generated by Github:

  • Pull request opened/closed/reopened
  • Issue opened/closed/reopened
  • Comment added on a pull request/issue

For more information, see README_GITHUB.md.

There is preliminary support for events generated by Travis-ci, but it is not yet fully functional. Documentation on the current functionality is specified in README_TRAVIS.md

Event destinations

Jira and Trello can be used as destinations for events. Both can be used concurrently.

Trello supports the following events:

  • new Github pull requests create a card
  • new Github issues create a card
  • Closing/reopening a pull request/issue adds a comment on the related card
  • Commenting on a pull request/issue adds a comment to the related card

For more information, see README_TRELLO.md.

Jira supports the following events:

  • new Github pull requests link to referenced Jira issues
  • new Github pull requests without a referenced Jira card are added as issues
  • Closing/reopening a pull request adds a comment on the Jira issue
  • Commenting on a pull request adds a comment to the related issue

For more information, see README_JIRA.md.

Hosting

puppet-webhooks is designed to run in Heroku without any modifications. For more information on running this app in Heroku, see README_HEROKU.md and HEROKU_QUICKSTART.md.

Importing

Existing PRs can be imported to Trello/Jira by invoking the thor import:pulls task.

Importing pull requests on a local instance:

$ bundle exec thor import:pulls puppetlabs/puppet-webhooks

Importing pull requests on a Heroku instance:

$ heroku run thor import:pulls puppetlabs/puppet-webhooks

Individual PRs can be imported by also specifying the pull request number after the repository name:

$ bundle exec thor import:pulls puppetlabs/puppet-webhooks 25

Running tests

The spec tests are configured to use an in-memory sqlite3 database with ActiveRecord and DelayedJob. The rake tasks, spec helper, and application itself should use the PuppetLabs::Webhook.setup_environment method to setup the database connection. The RACK_ENV is forced to 'test' when running the specs to ensure that test runs are consistent.

To run the specs:

$ bundle exec rake spec

Or $ bundle exec rspec

License

Apache 2.0. Please see the LICENSE file for more information.

About

Sinatra service for GitHub WebHooks

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 97.3%
  • Shell 2.7%