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));
});
위 코드를 게시했습니다. 테스트를 위해 github에서 임의의 분기를 발견했습니다. 나는 무작위 사용자뿐만 아니라 그 사용자의 커밋을 무작위로 발견했다. 널 (null) 정의되지 않은자바 스크립트에서 작동하도록 gitHub API를 가져올 수 없습니다. 구체적으로 gitdata.getCommit
어떤 도움이 좋지 않을까 bnoordhuis, http://mikedeboer.github.io/node-github/#gitdata.prototype.getCommit
나는 위의 코드를 실행하면, 내가 얻을 오류 코드 404 : 나는 여기 API에 대한 정보를 읽어! 나는 github api를 사용하는 데에 멍청하다. https://github.com/joyent/node/
나는 바보 같으며 즐거움은 레포의 일부라고 생각했습니다. 감사! – Powerbomb