Code Monkey home page Code Monkey logo

git-travis's Introduction

Git Travis-CI integration

Simple git subcommand to display the current build status for the project you are in.

Install

npm -g install git-travis

Usage

Change into a git repo that has builds on Travis-CI.

Then issue: git travis to display the latest build.

Options

To access github data over ssh, generate a GitHub Personal Access Token, make sure you have the following environment variable

export GITHUB_ACCESS_TOKEN=your_personal_access_token

More help: https://help.github.com/articles/creating-an-access-token-for-command-line-use/

Examples

Using my fork of YUI3

$ cd yui3
$ git travis
Fetching build status for davglass/yui3
    ✔ davglass/yui3
        Compare:  https://github.com/davglass/yui3/compare/1d1ad391f2d0...5b8b97fac95d
        ✔ 5b8b97f (3.x) Merge branch 'master' into 3.x (Dav Glass <[email protected]>) (finished)
            ✔ 446.1 node_js 0.6
            ✔ 446.2 node_js 0.8
            ✔ 446.3 node_js 0.9

Using the lodash repo

$ cd lodash
$ git travis
Fetching build status for bestiejs/lodash
    ✔ bestiejs/lodash
        Compare:  https://github.com/bestiejs/lodash/compare/33441e1b246c...28d505658407
        ✔ 28d5056 (master) Add json3.js, remove json2 and jslitmus from vendors. (John-David Dalton <[email protected]>) (finished)
            ✔ 56.1 node_js 0.6
            ✔ 56.2 node_js 0.8

It also supports your current working branch. It will try to locate the latest build from your current active branch and show that to you.

[yeti][grover (0.1.0)] ➔ git travis
Fetching build status for davglass/grover:0.1.0
    ✔ davglass/grover
        Compare:  https://github.com/davglass/grover/compare/5cbde21f2ede...13206b8df73a
        ✔ 13206b8 (0.1.0) Change for travis (Dav Glass <[email protected]>) (finished)
            ✔ 61.1 node_js 0.8
            ✔ 61.2 node_js 0.9
[yeti][grover (0.1.0)] ➔ git co master
Switched to branch 'master'
[yeti][grover (master)] ➔ git travis
Fetching build status for davglass/grover:master
    ✔ davglass/grover
        Compare:  https://github.com/davglass/grover/compare/fd8838853944...7295735b5528
        ✔ 7295735 (master) Removed deprecated 0.4 node build (Dav Glass <[email protected]>) (finished)
            ✔ 60.1 node_js 0.8
            ✔ 60.2 node_js 0.9

Notes

This was a simple script because I liked it, I'll add some configuration to it in the future.

Build Status

Build Status

git-travis's People

Contributors

davglass avatar pwmckenna avatar zhangchiqing avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

git-travis's Issues

Exception

After a clean install of git-travis:

git travis                                                                                                                                           « git · d591ab07285e · wcs/upgrade-4_25 »
Fetching build status for mdboom/astropy:On branch wcs/upgrade-4_25

TypeError: Cannot read property 'id' of undefined
    at /home/mdboom/.npm/lib/node_modules/git-travis/lib/index.js:111:50
    at Array.some (native)
    at /home/mdboom/.npm/lib/node_modules/git-travis/lib/index.js:110:24
    at Request._callback (/home/mdboom/.npm/lib/node_modules/git-travis/node_modules/travis-ci/lib/travis-http.js:34:13)
    at Request.self.callback (/home/mdboom/.npm/lib/node_modules/git-travis/node_modules/travis-ci/node_modules/request/index.js:148:22)
    at Request.emit (events.js:98:17)
    at Request.<anonymous> (/home/mdboom/.npm/lib/node_modules/git-travis/node_modules/travis-ci/node_modules/request/index.js:886:14)
    at Request.emit (events.js:117:20)
    at IncomingMessage.<anonymous> (/home/mdboom/.npm/lib/node_modules/git-travis/node_modules/travis-ci/node_modules/request/index.js:837:12)
    at IncomingMessage.emit (events.js:117:20)

TypeError: travis.repos.builds is not a function

Heyo! thanks for this app.

Getting this on my first run of git travis

❯ git travis
Fetching build status for GoogleChrome/lighthouse:master
/Users/paulirish/.config/yarn/global/node_modules/git-travis/lib/index.js:77
    travis.repos.builds({
                 ^

TypeError: travis.repos.builds is not a function
    at fetch (/Users/paulirish/.config/yarn/global/node_modules/git-travis/lib/index.js:77:18)
    at /Users/paulirish/.config/yarn/global/node_modules/git-travis/lib/index.js:277:13
    at ClientRequest.<anonymous> (/Users/paulirish/.config/yarn/global/node_modules/git-travis/lib/index.js:154:20)
    at Object.onceWrapper (events.js:293:19)
    at emitOne (events.js:96:13)
    at ClientRequest.emit (events.js:191:7)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:522:21)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:99:23)
    at TLSSocket.socketOnData (_http_client.js:411:20)
    at emitOne (events.js:96:13)

git remote data:

❯ git remote -v
GoogleChrome	git://github.com/GoogleChrome/lighthouse.git (fetch)
GoogleChrome	[email protected]:GoogleChrome/lighthouse.git (push)

Tried to debug but dont' know the travis API well enough to be useful.

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.