haunt icon indicating copy to clipboard operation
haunt copied to clipboard

Authentication is broken

Open marwahaha opened this issue 7 years ago • 0 comments

Hi @fat ! Cool library, but I can't authenticate.

I ran haunt with a local test.js file and against my own repository.

(py26) kmarwaha73-mac:foss kmarwaha$ haunt ./test.js https://github.com/marwahaha/moment
Please provide your github credentials:
+ username  marwahaha
+ password  
Testing locally https://github.com/marwahaha/moment...
/Users/kmarwaha/.nvm/versions/node/v6.10.0/lib/node_modules/haunt/lib/repo.js:143
    github.getPullRequests(this.data.owner.login, this.data.name, function (err, pullRequests) {
                                          ^

TypeError: Cannot read property 'login' of undefined
    at Repo.getPullRequests (/Users/kmarwaha/.nvm/versions/node/v6.10.0/lib/node_modules/haunt/lib/repo.js:143:43)
    at /Users/kmarwaha/.nvm/versions/node/v6.10.0/lib/node_modules/haunt/node_modules/async/lib/async.js:454:21
    at /Users/kmarwaha/.nvm/versions/node/v6.10.0/lib/node_modules/haunt/node_modules/async/lib/async.js:185:13
    at /Users/kmarwaha/.nvm/versions/node/v6.10.0/lib/node_modules/haunt/node_modules/async/lib/async.js:86:13
    at Array.forEach (native)
    at _forEach (/Users/kmarwaha/.nvm/versions/node/v6.10.0/lib/node_modules/haunt/node_modules/async/lib/async.js:26:24)
    at async.forEach (/Users/kmarwaha/.nvm/versions/node/v6.10.0/lib/node_modules/haunt/node_modules/async/lib/async.js:85:9)
    at _asyncMap (/Users/kmarwaha/.nvm/versions/node/v6.10.0/lib/node_modules/haunt/node_modules/async/lib/async.js:184:9)
    at Object.map (/Users/kmarwaha/.nvm/versions/node/v6.10.0/lib/node_modules/haunt/node_modules/async/lib/async.js:168:23)
    at Object.async.parallel (/Users/kmarwaha/.nvm/versions/node/v6.10.0/lib/node_modules/haunt/node_modules/async/lib/async.js:452:19)

my test.js file looks like this:

(py26) kmarwaha73-mac:foss kmarwaha$ cat test.js
var assert = require('assert');

module.exports = {

    'pull-requests': {

        'should be prefixed with the word bug': function (issue) {
            assert.ok(/^bug/.test(issue.title));
        },

        'after': function (issue) {

            if (issue.reporter.stats.failures) {
                issue.reportFailures(issue);
            }

        }

    }

}

marwahaha avatar Nov 18 '17 20:11 marwahaha