Tentacat v0.7.2 Tentacat.References

Summary

Functions

create(owner, repo, body, client)

Specs

create(binary, binary, list | map, Tentacat.Client.t) :: Tentacat.response

Create a Reference

Reference body example:

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

Example

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

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

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

Specs

find(binary, binary, binary, Tentacat.Client.t) :: Tentacat.response

Get a Reference

Example

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

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

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

Specs

list(binary, binary, Tentacat.Client.t) :: Tentacat.response

Get all References

Example

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

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

remove(owner, repo, ref, client)

Specs

remove(binary, binary, binary, Tentacat.Client.t) :: Tentacat.response

Delete a Reference

Example

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

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

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

Specs

update(binary, binary, binary, list | map, Tentacat.Client.t) :: Tentacat.response

Update a Reference

Reference body example:

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

Example

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

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