public class GHRef
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
GHRef.GHObject |
| Constructor and Description |
|---|
GHRef() |
| Modifier and Type | Method and Description |
|---|---|
void |
delete()
Deletes this ref from the repository using the GitHub API.
|
GHRef.GHObject |
getObject()
The object that this ref points to.
|
java.lang.String |
getRef()
Name of the ref, such as "refs/tags/abc"
|
java.net.URL |
getUrl()
The API URL of this tag, such as https://api.github.com/repos/jenkinsci/jenkins/git/refs/tags/1.312
|
void |
updateTo(java.lang.String sha)
Updates this ref to the specified commit.
|
void |
updateTo(java.lang.String sha,
java.lang.Boolean force)
Updates this ref to the specified commit.
|
public java.lang.String getRef()
public java.net.URL getUrl()
public GHRef.GHObject getObject()
public void updateTo(java.lang.String sha)
throws java.io.IOException
sha - The SHA1 value to set this reference tojava.io.IOExceptionpublic void updateTo(java.lang.String sha,
java.lang.Boolean force)
throws java.io.IOException
sha - The SHA1 value to set this reference toforce - Whether or not to force this ref update.java.io.IOExceptionpublic void delete()
throws java.io.IOException
java.io.IOExceptionCopyright © 2016. All Rights Reserved.