java.lang.Object
org.kohsuke.github.GHRef
Provides information on a Git ref from GitHub.
- Author:
- Michael Clarke
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
delete()
Deletes this ref from the repository using the GitHub API.The object that this ref points to.getRef()
Name of the ref, such as "refs/tags/abc".getUrl()
The API URL of this tag, such as https://api.github.com/repos/jenkinsci/jenkins/git/refs/tags/1.312void
Updates this ref to the specified commit.void
Updates this ref to the specified commit.
-
Constructor Details
-
GHRef
public GHRef()Create default GHRef instance
-
-
Method Details
-
getRef
Name of the ref, such as "refs/tags/abc".- Returns:
- the ref
-
getUrl
The API URL of this tag, such as https://api.github.com/repos/jenkinsci/jenkins/git/refs/tags/1.312- Returns:
- the url
-
getObject
The object that this ref points to.- Returns:
- the object
-
updateTo
Updates this ref to the specified commit.- Parameters:
sha
- The SHA1 value to set this reference to- Throws:
IOException
- the io exception
-
updateTo
Updates this ref to the specified commit.- Parameters:
sha
- The SHA1 value to set this reference toforce
- Whether or not to force this ref update.- Throws:
IOException
- the io exception
-
delete
Deletes this ref from the repository using the GitHub API.- Throws:
IOException
- the io exception
-