public class GHBranch extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
GHBranch.Commit
The type Commit.
|
| Modifier and Type | Method and Description |
|---|---|
void |
disableProtection()
Disables branch protection and allows anyone with push access to push changes.
|
GHBranchProtectionBuilder |
enableProtection()
Deprecated.
|
void |
enableProtection(EnforcementLevel level,
Collection<String> contexts)
Deprecated.
|
String |
getName()
Gets name.
|
GHRepository |
getOwner()
Gets owner.
|
GHBranchProtection |
getProtection()
Gets protection.
|
URL |
getProtectionUrl()
Deprecated.
|
GitHub |
getRoot()
Gets root.
|
String |
getSHA1()
Gets sha 1.
|
boolean |
isProtected()
Deprecated.
|
String |
toString() |
public GitHub getRoot()
public GHRepository getOwner()
public String getName()
@Preview @Deprecated public boolean isProtected()
@Preview @Deprecated public URL getProtectionUrl()
public GHBranchProtection getProtection() throws IOException
IOException - the io exceptionpublic String getSHA1()
public void disableProtection()
throws IOException
IOException - if disabling protection fails@Preview @Deprecated public GHBranchProtectionBuilder enableProtection()
GHCommitStatus#getContext()@Deprecated public void enableProtection(EnforcementLevel level, Collection<String> contexts) throws IOException
level - the levelcontexts - the contextsIOException - the io exceptionCopyright © 2020. All rights reserved.