module GitHub::REST::References
Overview
This module is specifically for interacting with the Reference endpoints GitHub offers us to use. A Git reference (git ref) is just a file that contains a Git commit SHA-1 hash. When referring to a Git commit, you can use the Git reference, which is an easy-to-remember name, rather than the hash. The Git reference can be rewritten to point to a new commit. A branch is just a Git reference that stores the new Git commit hash. These endpoints allow you to read and write references to your Git database on GitHub. see GitHub Refs endpoints
Direct including types
Defined in:
githubcr/rest.crInstance Method Summary
-
#create_reference(owner : String, repository : String, payload : RefPayload) : Ref
Creates a reference for your repository.
-
#delete_reference(owner : String, repository : String, reference : String) : Nil
NOTE If this raises an error, you've failed to delete the reference.
-
#delete_reference_tag
TODO Check out the endpoint since it's missing in the docs.
-
#get_matching_references(owner : String, repository : String, reference : String) : Array(Ref)
Returns an array of references from your Git database that match the supplied name.
-
#get_reference(owner : String, repository : String, reference : String) : Ref
Get a single Reference by it's ID
- #update_reference(owner : String, repository : String, payload : RefPatchPayload) : Ref
Instance Method Detail
Creates a reference for your repository. You are unable to create new references for empty repositories, even if the commit SHA-1 hash used exists. Empty repositories are repositories without branches.
NOTE If this raises an error, you've failed to delete the reference.
Returns an array of references from your Git database that match the supplied name.
The :ref in the URL must be formatted as heads/
Get a single Reference by it's ID