createTag method

Future<GitTag> createTag(
  1. RepositorySlug slug,
  2. CreateGitTag tag
)

Creates a new tag in a repository.

API docs: https://developer.github.com/v3/git/tags/#create-a-tag-object

Implementation

Future<GitTag> createTag(RepositorySlug slug, CreateGitTag tag) =>
    github.postJSON(
      '/repos/${slug.fullName}/git/tags',
      convert: GitTag.fromJson,
      statusCode: StatusCodes.CREATED,
      body: GitHubJson.encode(tag),
    );