Skip to content

How to list all tags? #298

@nkt

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..

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