public static class ApprovalRule.Builder extends Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
ApprovalRule |
build() |
ApprovalRule.Builder |
copy(ApprovalRule model) |
ApprovalRule.Builder |
destinationBranch(String destinationBranch)
Branch name where pull requests targeting the branch must satisfy the approval rule.
|
ApprovalRule.Builder |
minApprovalsCount(Integer minApprovalsCount)
Minimum number of approvals which must be provided by the reviewers specified in the list
before the rule can be satisfied
|
ApprovalRule.Builder |
name(String name)
Name which is used to uniquely identify an approval rule.
|
ApprovalRule.Builder |
reviewers(List<PrincipalDetails> reviewers)
List of users who must provide approvals up to the minApprovalsCount specified in the
rule.
|
public ApprovalRule.Builder name(String name)
Name which is used to uniquely identify an approval rule.
name
- the value to setpublic ApprovalRule.Builder destinationBranch(String destinationBranch)
Branch name where pull requests targeting the branch must satisfy the approval rule. This value being null means the rule applies to all pull requests
destinationBranch
- the value to setpublic ApprovalRule.Builder reviewers(List<PrincipalDetails> reviewers)
List of users who must provide approvals up to the minApprovalsCount specified in the rule. An empty list means the approvals can come from any user.
reviewers
- the value to setpublic ApprovalRule.Builder minApprovalsCount(Integer minApprovalsCount)
Minimum number of approvals which must be provided by the reviewers specified in the list before the rule can be satisfied
minApprovalsCount
- the value to setpublic ApprovalRule build()
public ApprovalRule.Builder copy(ApprovalRule model)
Copyright © 2016–2024. All rights reserved.