Search code examples
node.jsexpressmean-stackgitlab-api

Get project commits using node-gitlab api


Using node-gitlab API in NodeJS application, how can i get a project's list of commits. I could get the list of projects using:

router.get('/projects', function(req, res, next) {
    gitlab.projects.all(function(projects) {
    res.json(projects);
    console.log(projects);
  });
});

Thanks


Solution

  • I found the way to do it

    gitlab.projects.repository.listCommits(projectId,function(commits) {
    

    });