mirror of
https://github.com/jlengrand/github-api.git
synced 2026-03-10 08:21:21 +00:00
add branch protection attributes
This commit is contained in:
@@ -1,13 +1,16 @@
|
||||
package org.kohsuke.github;
|
||||
|
||||
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
||||
import org.kohsuke.github.BranchProtection.RequiredStatusChecks;
|
||||
import static org.kohsuke.github.Previews.LOKI;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
|
||||
import static org.kohsuke.github.Previews.LOKI;
|
||||
import org.kohsuke.github.BranchProtection.RequiredStatusChecks;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
||||
|
||||
/**
|
||||
* A branch in a repository.
|
||||
@@ -22,6 +25,10 @@ public class GHBranch {
|
||||
|
||||
private String name;
|
||||
private Commit commit;
|
||||
@JsonProperty("protected")
|
||||
private boolean protection;
|
||||
private String protection_url;
|
||||
|
||||
|
||||
public static class Commit {
|
||||
String sha;
|
||||
@@ -44,6 +51,15 @@ public class GHBranch {
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public boolean isProtected() {
|
||||
return protection;
|
||||
}
|
||||
|
||||
public String getProtection_url() {
|
||||
return protection_url;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* The commit that this branch currently points to.
|
||||
|
||||
Reference in New Issue
Block a user