Skip to content

How to list all tags? #298

Description

@nkt

Hi!

var GitRepository = require('nodegit').Repository;
var GitTag = require('nodegit').Tag;
var Promise = require('bluebird');

var tags = GitRepository.open(repositoryPath).then(function (repo) {
    GitTag.list(repo);
});
Promise.map(tags, function (tag) {
    return {
        name: tag.name()
    }
}).then(function (tags) {
    res.json(tags);
});

This code throws error: Repository repo is required..

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions