← All procedures

git.tag.list

List the tags, with their commits

CLI
Package
@procedures/git · README
Path
["git","tag","list"]
CLI
mark git tag list
As data
{"$proc":["git","tag","list"],"input":{}}

Use it

In TypeScript

import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/git/register"; // registers its procedures

const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["git","tag","list"], {});
console.log(JSON.stringify(result));

From the command line

$ mark git tag list

As data, in a program

{ "$proc": ["git", "tag", "list"], "input": {} }

Input

FieldTypeRequiredDefaultDescription
patternstringnoA glob pattern for the tag names, for example v1.*
cwdstringnoWorking directory

Output

FieldTypeRequiredDefaultDescription
tagsobject[]yesThe tags, sorted by name
JSON Schemas
{
  "input": {
    "type": "object",
    "properties": {
      "pattern": {
        "description": "A glob pattern for the tag names, for example v1.*",
        "type": "string"
      },
      "cwd": {
        "description": "Working directory",
        "type": "string"
      }
    }
  },
  "output": {
    "type": "object",
    "properties": {
      "tags": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "description": "The tag name"
            },
            "hash": {
              "type": "string",
              "description": "The commit of the tag"
            },
            "annotated": {
              "type": "boolean",
              "description": "True for an annotated tag"
            },
            "message": {
              "description": "For an annotated tag: the subject of its message",
              "type": "string"
            }
          },
          "required": [
            "name",
            "hash",
            "annotated"
          ],
          "additionalProperties": {}
        },
        "description": "The tags, sorted by name"
      }
    },
    "required": [
      "tags"
    ],
    "additionalProperties": {}
  }
}