View Source Tentacat.Repositories.Labels (Tentacat v2.4.0)

Summary

Functions

Creates a new label on a repository.

Delete a label on a repository.

Find a label on a repository.

List labels on a repository.

Functions

Link to this function

create(client \\ %Client{}, owner, repo, body)

View Source
@spec create(Tentacat.Client.t(), binary(), binary(), map()) :: Tentacat.response()

Creates a new label on a repository.

Possible values for body:

  • %{name: "name of label"} (required)
  • %{color: "color of label"} (required)

Example

Tentacat.Repositories.Labels.create "elixir-lang", "elixir", %{name: "Important", color: "f29513"}

More info at: https://developer.github.com/v3/issues/labels/#create-a-label

Link to this function

delete(client \\ %Client{}, owner, repo, name)

View Source
@spec delete(Tentacat.Client.t(), binary(), binary(), binary()) :: Tentacat.response()

Delete a label on a repository.

Example

Tentacat.Repositories.Labels.delete "elixir-lang", "elixir", "Important"

More info at: https://developer.github.com/v3/issues/labels/#delete-a-label

Link to this function

find(client \\ %Client{}, owner, repo, name)

View Source

Find a label on a repository.

Example

Tentacat.Repositories.Labels.find "elixir-lang", "elixir", "WIP"

More info at: https://developer.github.com/v3/issues/labels/#get-a-single-label

Link to this function

list(client \\ %Client{}, owner, repo)

View Source

List labels on a repository.

Example

Tentacat.Repositories.Labels.list "elixir-lang", "elixir"

More info at: https://developer.github.com/v3/issues/labels/#list-all-labels-for-this-repository

Link to this function

update(client \\ %Client{}, owner, repo, name, body)

View Source
@spec update(Tentacat.Client.t(), binary(), binary(), binary(), map()) ::
  Tentacat.response()

Update a label on a repository.

Possible values for body:

  • %{name: "name of label"} (required)
  • %{color: "color of label"} (required)

Example

Tentacat.Repositories.Labels.update "elixir-lang", "elixir", "Important", %{color: "000000"}

More info at: https://developer.github.com/v3/issues/labels/#update-a-label