Package org.kohsuke.github
Class GHBranchProtectionBuilder
- java.lang.Object
-
- org.kohsuke.github.GHBranchProtectionBuilder
-
public class GHBranchProtectionBuilder extends Object
Builder to configure the branch protection settings.- See Also:
GHBranch#enableProtection()
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GHBranchProtectionBuilderaddRequiredChecks(String... checks)Add required checks gh branch protection builder.GHBranchProtectionBuilderaddRequiredChecks(Collection<String> checks)Add required checks gh branch protection builder.GHBranchProtectionBuilderdismissStaleReviews()Dismiss stale reviews gh branch protection builder.GHBranchProtectionBuilderdismissStaleReviews(boolean v)Dismiss stale reviews gh branch protection builder.GHBranchProtectionenable()Enable gh branch protection.GHBranchProtectionBuilderincludeAdmins()Include admins gh branch protection builder.GHBranchProtectionBuilderincludeAdmins(boolean v)Include admins gh branch protection builder.GHBranchProtectionBuilderrequireBranchIsUpToDate()Require branch is up to date gh branch protection builder.GHBranchProtectionBuilderrequireBranchIsUpToDate(boolean v)Require branch is up to date gh branch protection builder.GHBranchProtectionBuilderrequireCodeOwnReviews()Require code own reviews gh branch protection builder.GHBranchProtectionBuilderrequireCodeOwnReviews(boolean v)Require code own reviews gh branch protection builder.GHBranchProtectionBuilderrequiredReviewers(int v)Required reviewers gh branch protection builder.GHBranchProtectionBuilderrequireReviews()Require reviews gh branch protection builder.GHBranchProtectionBuilderrestrictPushAccess()Restrict push access gh branch protection builder.GHBranchProtectionBuilderrestrictReviewDismissals()Restrict review dismissals gh branch protection builder.GHBranchProtectionBuilderteamPushAccess(Collection<GHTeam> teams)Team push access gh branch protection builder.GHBranchProtectionBuilderteamPushAccess(GHTeam... teams)Team push access gh branch protection builder.GHBranchProtectionBuilderteamReviewDismissals(Collection<GHTeam> teams)Team review dismissals gh branch protection builder.GHBranchProtectionBuilderteamReviewDismissals(GHTeam... teams)Team review dismissals gh branch protection builder.GHBranchProtectionBuilderuserPushAccess(Collection<GHUser> users)User push access gh branch protection builder.GHBranchProtectionBuilderuserPushAccess(GHUser... users)User push access gh branch protection builder.GHBranchProtectionBuilderuserReviewDismissals(Collection<GHUser> users)User review dismissals gh branch protection builder.GHBranchProtectionBuilderuserReviewDismissals(GHUser... users)User review dismissals gh branch protection builder.
-
-
-
Method Detail
-
addRequiredChecks
public GHBranchProtectionBuilder addRequiredChecks(Collection<String> checks)
Add required checks gh branch protection builder.- Parameters:
checks- the checks- Returns:
- the gh branch protection builder
-
addRequiredChecks
public GHBranchProtectionBuilder addRequiredChecks(String... checks)
Add required checks gh branch protection builder.- Parameters:
checks- the checks- Returns:
- the gh branch protection builder
-
dismissStaleReviews
public GHBranchProtectionBuilder dismissStaleReviews()
Dismiss stale reviews gh branch protection builder.- Returns:
- the gh branch protection builder
-
dismissStaleReviews
public GHBranchProtectionBuilder dismissStaleReviews(boolean v)
Dismiss stale reviews gh branch protection builder.- Parameters:
v- the v- Returns:
- the gh branch protection builder
-
enable
public GHBranchProtection enable() throws IOException
Enable gh branch protection.- Returns:
- the gh branch protection
- Throws:
IOException- the io exception
-
includeAdmins
public GHBranchProtectionBuilder includeAdmins()
Include admins gh branch protection builder.- Returns:
- the gh branch protection builder
-
includeAdmins
public GHBranchProtectionBuilder includeAdmins(boolean v)
Include admins gh branch protection builder.- Parameters:
v- the v- Returns:
- the gh branch protection builder
-
requiredReviewers
public GHBranchProtectionBuilder requiredReviewers(int v)
Required reviewers gh branch protection builder.- Parameters:
v- the v- Returns:
- the gh branch protection builder
-
requireBranchIsUpToDate
public GHBranchProtectionBuilder requireBranchIsUpToDate()
Require branch is up to date gh branch protection builder.- Returns:
- the gh branch protection builder
-
requireBranchIsUpToDate
public GHBranchProtectionBuilder requireBranchIsUpToDate(boolean v)
Require branch is up to date gh branch protection builder.- Parameters:
v- the v- Returns:
- the gh branch protection builder
-
requireCodeOwnReviews
public GHBranchProtectionBuilder requireCodeOwnReviews()
Require code own reviews gh branch protection builder.- Returns:
- the gh branch protection builder
-
requireCodeOwnReviews
public GHBranchProtectionBuilder requireCodeOwnReviews(boolean v)
Require code own reviews gh branch protection builder.- Parameters:
v- the v- Returns:
- the gh branch protection builder
-
requireReviews
public GHBranchProtectionBuilder requireReviews()
Require reviews gh branch protection builder.- Returns:
- the gh branch protection builder
-
restrictReviewDismissals
public GHBranchProtectionBuilder restrictReviewDismissals()
Restrict review dismissals gh branch protection builder.- Returns:
- the gh branch protection builder
-
restrictPushAccess
public GHBranchProtectionBuilder restrictPushAccess()
Restrict push access gh branch protection builder.- Returns:
- the gh branch protection builder
-
teamPushAccess
public GHBranchProtectionBuilder teamPushAccess(Collection<GHTeam> teams)
Team push access gh branch protection builder.- Parameters:
teams- the teams- Returns:
- the gh branch protection builder
-
teamPushAccess
public GHBranchProtectionBuilder teamPushAccess(GHTeam... teams)
Team push access gh branch protection builder.- Parameters:
teams- the teams- Returns:
- the gh branch protection builder
-
teamReviewDismissals
public GHBranchProtectionBuilder teamReviewDismissals(Collection<GHTeam> teams)
Team review dismissals gh branch protection builder.- Parameters:
teams- the teams- Returns:
- the gh branch protection builder
-
teamReviewDismissals
public GHBranchProtectionBuilder teamReviewDismissals(GHTeam... teams)
Team review dismissals gh branch protection builder.- Parameters:
teams- the teams- Returns:
- the gh branch protection builder
-
userPushAccess
public GHBranchProtectionBuilder userPushAccess(Collection<GHUser> users)
User push access gh branch protection builder.- Parameters:
users- the users- Returns:
- the gh branch protection builder
-
userPushAccess
public GHBranchProtectionBuilder userPushAccess(GHUser... users)
User push access gh branch protection builder.- Parameters:
users- the users- Returns:
- the gh branch protection builder
-
userReviewDismissals
public GHBranchProtectionBuilder userReviewDismissals(Collection<GHUser> users)
User review dismissals gh branch protection builder.- Parameters:
users- the users- Returns:
- the gh branch protection builder
-
userReviewDismissals
public GHBranchProtectionBuilder userReviewDismissals(GHUser... users)
User review dismissals gh branch protection builder.- Parameters:
users- the users- Returns:
- the gh branch protection builder
-
-