Skip to content

API support for listing tags and fetching tag details #2738

@stephenc

Description

@stephenc

Description

The API currently exposes details of branches and pull requests but does not allow discovering tags.

The minimum support that I would like to see:

  • A way to get a list of all tags in a repository, e.g. /api/v1/repos/${repoOwner}/${repoName}/tags
  • A way to get a specific tag, e.g. /api/v1/repos/${repoOwner}/${repoName}/tags/${tagName}
  • Push event notification on creation of tags (if not already present)

The tag JSON object should probably have the following structure:

  • lightweight tags (i.e. where the tag refers to a commit):

    {
      name: "v1.0.0",
      commit: {
        id: "...",
        message: "...",
        url: "...",
        author: {
          name: "...",
          email: "...",
          username: "..."
        },
        committer: {
          name: "...",
          email: "...",
          username: "..."
        },
        verification: {
          verified: false,
          reason: "gpg.error.not_signed_commit",
          signature: "",
          payload: ""
        },
        timestamp: "2017-08-31T19:26:04Z"
      }
    }
    
  • annotated tags (i.e. where the tag is an object referencing the commit):

    {
      name: "v1.0.0",
      tag: {
        id: "...",
        message: "...",
        url: "...",
        author: {
          name: "...",
          email: "...",
          username: "..."
        },
        committer: {
          name: "...",
          email: "...",
          username: "..."
        },
        verification: {
          verified: false,
          reason: "gpg.error.not_signed_commit",
          signature: "",
          payload: ""
        },
        timestamp: "2017-08-31T19:26:04Z",
        commit: {
          id: "...",
          message: "...",
          url: "...",
          author: {
            name: "...",
            email: "...",
            username: "..."
          },
          committer: {
            name: "...",
            email: "...",
            username: "..."
          },
          verification: {
            verified: false,
            reason: "gpg.error.not_signed_commit",
            signature: "",
            payload: ""
          },
          timestamp: "2017-08-31T19:26:04Z"
        }
      }
    }
    

Metadata

Metadata

Assignees

Labels

issue/criticalThis issue should be fixed ASAP. If it is a PR, the PR should be merged ASAPmodifies/apiThis PR adds API routes or modifies themtype/featureCompletely new functionality. Can only be merged if feature freeze is not active.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions