Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication is broken #23

Open
marwahaha opened this issue Nov 18, 2017 · 0 comments
Open

Authentication is broken #23

marwahaha opened this issue Nov 18, 2017 · 0 comments

Comments

@marwahaha
Copy link

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);
            }

        }

    }

}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant