GithubHelp home page GithubHelp logo

github-status-reporter's Introduction

Github Status Reporter

Updates build status on Github from a script.

Build Status

Code Climate

Coverage Status

Dependencies

NPM version

##Install

npm install -g github-status-reporter

##Usage

export GITHUB_TOKEN=<github_token>
github-status-reporter --user <repo_user> --repo <repo_name>
  --branch <branch_name> --state <failure|pending|success>

###Example

To update github.com/TakenPilot/github-status-reporter to a success state

export GITHUB_TOKEN=ABCDEFGHIJKLMNOPQRSTUVWXYZ
github-status-reporter --user TakenPilot --repo github-status-reporter
  --branch master --state success

###Example 2

To update github.com/TakenPilot/github-status-reporter to a pending state with extra message

export GITHUB_TOKEN=ABCDEFGHIJKLMNOPQRSTUVWXYZ
github-status-reporter
  --user TakenPilot --repo github-status-reporter
  --branch master --state success
  --target-url='http://github.com/TakenPilot/github-status-reporter'
  --description='Waiting for unit tests'

##API

###Token

Security Token of account that can access the repo and has enough permissions to change its status. Can be set as an environment variable as GITHUB_TOKEN.

github-status-reporter --token ABCDE ...

###User

The user or organisation of the repo, so johnsmith/some-repo would be. Can be set as an environment variable as GITHUB_USER.

github-status-reporter --user johnsmith --repo some-repo ...

###Repo

The repo to update

github-status-reporter --repo repo-name ...

###Sha

Either sha or branch are required to identify the commit to set the status of. If sha is not 40 characters, it's assumed to be a branch name. Can be set as an environment variable as GITHUB_SHA.

github-status-reporter --sha 4eb9e0fd807f95473dc7207c556014215c40ec3b ...

github-status-reporter --sha master ...

###Branch

Either Sha or Branch are required to identify the commit to set the status of. Can be set as an environment variable as GITHUB_BRANCH.

github-status-reporter --branch master ...

###State

The state to set the build status to, i.e., pending, success, failure, etc. Can be set as an environment variable as GITHUB_STATE.

github-status-reporter --state success ...

###Description

Optional message along with the status.

github-status-reporter --description 'tests failed' ...

###Target-Url

Optional link for when someone clicks on the build status.

github-status-reporter --target-url 'jenkins.example.com/build/1524' ...

github-status-reporter's People

Contributors

takenpilot avatar

Watchers

 avatar  avatar

Forkers

darkcl

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.