Tentacat.References
Summary
| create(owner, repo, body, client) | Create a Reference |
| find(owner, repo, ref, client \\ %Tentacat.Client{}) | Get a Reference |
| list(owner, repo, client \\ %Tentacat.Client{}) | Get all References |
| remove(owner, repo, ref, client) | Delete a Reference |
| update(owner, repo, ref, body, client) | Update a Reference |
Functions
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
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
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
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
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