GithubHelp home page GithubHelp logo

shaolonghu / github-bugzilla-hook Goto Github PK

View Code? Open in Web Editor NEW

This project forked from atodorov/github-bugzilla-hook

0.0 2.0 0.0 23 KB

Web hook to post comments to relevant bugs

License: GNU General Public License v2.0

Python 100.00%

github-bugzilla-hook's Introduction

Tools for commenting about commits on Bugzilla

Any commits which reference a Bugzilla number will be posted as comments on the bug. Bugs are specified either as '(#123456)' on the first line or as 'Resolves: rhbz#123456' on any line of the commit message. Only one comment per branch per bug is posted in Bugzilla.

The platform

wsgi.py implements the webhook. It's designed in particular for use with mod_wsgi, but there's a main block to facilitate use as a standalone application and that will probably work ok.

The web hook must be running somewhere with a publicly-accessible URL.

Configuration

This service uses several environment variables for its configuration.

  • GHBH_BUGZILLA_URL - The XML-RPC url to Bugzilla, for example https://bugzilla.redhat.com/xmlrpc.cgi
  • GHBH_BUGZILLA_USERNAME - Username to read and post comments
  • GHBH_BUGZILLA_PASSWORD - Login password

Optional configuration:

  • GHBH_GITHUB_SECRET - Recommended If set, this is the secret used to configure the webhook on github, and is used to verify that push events are sent from GitHub.
  • GHBH_HTTP_PORT - The HTTP port to listen on if running the webhook as a standalone service.

On GitHub

Go to the settings for the repository you want to connect to Bugzilla. Under "Webhooks & Services," add a webhook. Put in the URL for the web service, select "application/json" for the content type, set a secret if you're using one.

Under the choices of events to receive, select "Just the push event".

Bugs

Yes, probably. Feel free to contact me about this thing via github or email. Patches welcome!

Credits

Lots of the initial code and documentation is taken from David Shea's https://github.com/rhinstaller/github-email-hook/

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.