使用node-gitlab API获取项目提交
在NodeJS应用程序中使用node-gitlab API,我怎样才能得到一个项目的提交列表。 我可以使用以下项目获取项目列表:
router.get('/projects', function(req, res, next) { gitlab.projects.all(function(projects) { res.json(projects); console.log(projects); }); });
谢谢
我find了办法
gitlab.projects.repository.listCommits(projectId,function(commits) {
});
它没有logging在API中,但我发现它在包的repository.js文件中:
gitlab.repository.getCommits(id, ref_name)
id:projectId,
ref_name:存储库分支或标记的名称,或者如果没有给定缺省分支