Skip to content

Report something after a pull request has merged (e.g. deployment status)

License

Notifications You must be signed in to change notification settings

Botpy/hindsight

Repository files navigation

https://travis-ci.org/coldnight/hindsight.svg?branch=master

Hindsight

Becase of this PR and created this project.

Report something after a pull request has merged. Such as

  • Deployment status

Implements this by using the search api to find which pull request the commit belongs:

curl -vv https://api.github.com/search/issues?q=type:pr+repo:asyncat/demo+1a00a4f061e2e141f7fe2386b8758ef9b549397c

Usage

How to install

$ git clone https://github.com/coldnight/hindsight
$ cd hindsight
$ virtualenv .venv
$ . .venv/bin/activate
$ pip install -U -r requirements.txt

How to configure

  1. Copy cfg.toml.example to cfg.toml, and edit it accordingly.

  2. Add a Webhook to your continuous integration service:

    hindsight supports deployment via buildbot, insert the following code to the master.cfg file:

    Buildbot 8:

    from buildbot.status.status_push import HttpStatusPush
    
    c['status'].append(HttpStatusPush(
        serverUrl='http://HOST:PORT/deployment',
        extra_post_params={'secret': 'repo.NAME.secret in cfg.toml'},
    ))

    Buildbot 9:

    from buildbot.plugins import reporters
    
    c['services'] = []
    
    sp = reporters.HttpStatusPush(
         serverUrl="http://HOST:PORT/deployment",
         wantProperties=True,
         user="buildbot",
         password="repo.NAME.secret in cfg.toml",
     )
     c['services'].append(sp)

How to run

python -m hindsight.app cfg.toml

About

Report something after a pull request has merged (e.g. deployment status)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages