2
var GitHubApi = require("github");

var github = new GitHubApi({
    // required
    version: "3.0.0",
    // optional
    debug: true,
    protocol: "https",
    host: "github.com",
    //pathPrefix: "/joyent/node", // for some GHEs
    timeout: 5000
});
github.gitdata.getCommit({
    user: "bnoordhuis",
    repo: "/joyent/node",
    sha: "c30cc4e3a5ead3ca5b48e8eec445740775888ed8"
}, function(err, res) {
    console.log(JSON.stringify(res));
});

I posted the code above. I found a random branch in github for testing. I also found a random user as well as that user's commit randomly. I read information about the API here: http://mikedeboer.github.io/node-github/#gitdata.prototype.getCommit

When I run the code above, I get error code 404, null bnoordhuis undefined

Any help would be awesome! I am a noob to using github api.

Here is the repo I am trying to use: https://github.com/joyent/node/

1 Answer 1

1

Your repository should just be 'node'. Joyent is the user.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.