Tentacat v2.2.0 Tentacat.References View Source
Link to this section Summary
Functions
Create a Reference
Get a Reference
Get all References
Delete a Reference
Update a Reference
Link to this section Functions
Link to this function
create(client, owner, repo, body)
View Sourcecreate(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 Sourcefind(Tentacat.Client.t(), binary(), binary(), binary()) :: Tentacat.response()
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 Sourcelist(Tentacat.Client.t(), binary(), binary()) :: Tentacat.response()
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 Sourceremove(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 Sourceupdate(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