GithubHelp home page GithubHelp logo

isabella232 / puppet-webhooks Goto Github PK

View Code? Open in Web Editor NEW

This project forked from puppetlabs-toy-chest/puppet-webhooks

0.0 0.0 0.0 494 KB

Sinatra service for GitHub WebHooks

License: Other

Ruby 97.27% Shell 2.73%

puppet-webhooks's Introduction

Puppet WebHooks

Build Status

puppet-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.

puppet-webhooks's People

Contributors

adrienthebo avatar razic avatar kbarber avatar nigelkersten avatar ferventcoder avatar hone avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.