module Gitlab::Client::Tag

Overview

Defines methods related to tag.

See http://docs.gitlab.com/ce/api/tags.html

Direct including types

Defined in:

gitlab/client/tag.cr

Instance Method Summary

Instance Method Detail

def create_release_notes(project_id : Int32, tag : String, description : String) : JSON::Any #

Create release notes in a project.

  • param [Int32] project The ID of a project.
  • param [String] tag The name of a tag.
  • param [String] description Release notes with markdown support.
  • return [JSON::Any] Information about the created release notes in a project.
client.create_release_notes(1, "1.0.0", "Release v1.0.0")

[View source]
def create_tag(project_id : Int32, tag : String, ref : String, form : Hash = {} of String => String) : JSON::Any #

Create a tag in a project.

  • param [Int32] project The ID of a project.
  • param [String] tag The name of a tag.
  • param [String] ref Create tag using commit SHA, another tag name, or branch name.
  • param [String] form A customizable set of the params.
  • option form [String] :message Creates annotated tag.
  • option form [String] :release_description Add release notes to the git tag and store it in the GitLab database.
  • return [JSON::Any] Information about the created tag in a project.
client.create_tag(1, "1.0.0", "master")
client.create_tag(1, "1.0.1", "1.0.0", {"message" => "message in tag", "release_description" => "message in gitlab"})

[View source]
def delete_tag(project_id : Int32, tag : String) : JSON::Any | Bool #

Delete a tag.

  • param [Int32] project_id The ID of a project.
  • param [String] tag The name of a tag.
  • return [JSON::Any] Information about the deleted tag.
client.delete_tag(42)

[View source]
def tag(project_id : Int32, tag : String) : JSON::Any #

Get single tag in a project.

  • param [Int32] project The ID of a project.
  • param [String] tag The name of a tag.
  • return [JSON::Any] Information about the tag in a project.
client.tag(1, "master")

[View source]
def tags(project_id : Int32, params : Hash | Nil = nil) : JSON::Any #

Gets a list of tags in a project.

  • param [Int32] project The ID of a project.
  • param [Hash] params A customizable set of params.
  • option params [String] :page The page number.
  • option params [String] :per_page The number of results per page. default is 20
  • return [JSON::Any] List of tags under a project.
client.tags(1)
client.tags(1, {"per_page" => "10"})

[View source]
def update_release_notes(project_id : Int32, tag : String, description : String) : JSON::Any #

Update release notes in a project.

  • param [Int32] project The ID of a project.
  • param [String] tag The name of a tag.
  • param [String] description Release notes with markdown support.
  • return [JSON::Any] Information about the updated release notes in a project.
client.update_release_notes(1, "1.0.0", "# Release v1.0.0\n## xxx\n## xxx")

[View source]