Skip to content

Repository files navigation

circle-target-branch-check

Simple service to attach a Github status message to Pull Requests, with the current CircleCI status of the PR's target branch.

When a CircleCI build completes, this looks for any open Pull Requests based off the branch that was built, and posts a status to each one informing the PR author whether their target branch is red or green.

When a Pull Request is opened or pushed to, this asks CircleCI for the latest build for the PR's base branch, and posts a status to the PR.

success

failure

Setup

Deploy

  1. Clone this repo and deploy (Heroku is easy).
  2. Set the GH_TOKEN environment variable to a Github access token with repo scope (or public_repo for public repositories).
  3. Set the CIRCLE_TOKEN environment variable to a CircleCI API Token.

Github webhook

  • Create a Github webhook for the repo you wish to use.
  • Set the Payload URL to the deployed URL of this app, plus /payload/github (e.g. http://myservice.example.com/payload/github).
  • Set the webhook to send only events of type 'Pull Request'.

Circle webhook

Configure a Circle notification pointing at the deployed URL of this app, plus /payload/circle. e.g:

notify:
  webhooks:
    - url: https://myservice.example.com/payload/circle

Developing

Prerequisites

You will need Leiningen 2.0.0 or above installed.

Running

To start a web server for the application, run:

lein ring server

License

Copyright © 2015 FIXME

About

Simple service to post target branch build status to PR's

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages