View Source Tentacat.References (Tentacat v2.5.0)

Summary

Functions

Link to this function

create(client, owner, repo, body)

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

Create a Reference.

Reference body example:

%{
  "ref" => "refs/heads/emj-otp-18",
  "sha" => "aa218f56b14c9653891f9e74264a383fa43fefbd"
}

Example

Tentacat.References.create client, "elixir-lang", "elixir", ref_body

More info at: https://developer.github.com/v3/git/refs/#create-a-reference

Link to this function

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

View Source

Get a Reference.

Example

Tentacat.References.find "elixir-lang", "elixir", "heads/emj-otp-18"
Tentacat.References.find client, "elixir-lang", "elixir", "heads/emj-otp-18"

More info at: https://developer.github.com/v3/git/refs/#get-a-reference

Link to this function

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

View Source

Get all References.

Example

Tentacat.References.list "elixir-lang", "elixir"
Tentacat.References.list client, "elixir-lang", "elixir"

More info at: https://developer.github.com/v3/git/refs/#get-all-references

Link to this function

remove(client, owner, repo, ref)

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

Delete a Reference.

Example

Tentacat.References.remove client, "elixir-lang", "elixir", "heads/emj-otp-18"
Tentacat.References.remove client, "elixir-lang", "elixir", "tags/v1.0.2"

More info at: https://developer.github.com/v3/git/refs/#delete-a-reference

Link to this function

update(client, owner, repo, ref, body)

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

Update a Reference.

Reference body example:

%{
  "sha"   => "aa218f56b14c9653891f9e74264a383fa43fefbd",
  "force" => true
}

Example

Tentacat.References.update client, "elixir-lang", "elixir", "heads/emj-otp-18", body

More info at: https://developer.github.com/v3/git/refs/#update-a-reference