status

Updates pull requests on github using the statuses api (developer.github.com/v3/repos/statuses/), with latest build from Jenkins and QA status

Usage

gem install update_status

on your branch run

$: status

This will generate a .status.yml file in the current directory, you will need to edit this file with your credentials.

.status.yml:

:username: Jenkins username
  :password: Jenkins password
  :token: Githubs API token (http://developer.github.com/v3/oauth/)
  :owner: Owner of the repository eg. dougdroper
  :repo: eg. status
  :ci_url: eg. http://ci.jenkins.com
  :qa_required: true

add .status.yml to .gitignore

##

When your branch has passed QA

$: status -q pass

You can pass a different branch

$: status -b other_feature_branch

or

$: status -b other_feature_branch -q pass

You can also pass based on the SHA

$: status -s SHA -q pass

When qa_required is false then there is no need to pass in a qa option

help

$: status -h

Github oauth

You need an API token to interact with githubs api

$: curl -u “YOUR GITHUB USERNAME” -d '{“add_scopes”:}' api.github.com/authorizations

{
  "id": 1,
  "url": "https://api.github.com/authorizations/1",
  "app": {
    "name": "GitHub API",
    "url": "http://developer.github.com/v3/oauth/#oauth-authorizations-api"
  },
  "token": "NEW TOKEN",
  "note": null,
  "note_url": null,
  "created_at": "2013-02-11T17:02:36Z",
  "updated_at": "2013-02-11T17:02:36Z",
  "scopes": [
  ]
}

This generates a new token, now you need to add_scopes to the id of the returned token

$: curl -u “YOUR GITHUB USERNAME” -d '{“add_scopes”:}' api.github.com/authorizations/1

Then add this token in the .status.yml file

Contributing to status

Copyright © 2012 Douglas Roper. See LICENSE.txt for further details.