add branch protection attributes

This commit is contained in:
Jeffrey.Nelson
2016-12-22 11:55:01 -06:00
parent 9d15cd43a3
commit 26c20a7a22

View File

@@ -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.