Class ApprovalRule.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • name

        public ApprovalRule.Builder name​(String name)
        Name which is used to uniquely identify an approval rule.
        Parameters:
        name - the value to set
        Returns:
        this builder
      • destinationBranch

        public 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

        Parameters:
        destinationBranch - the value to set
        Returns:
        this builder
      • reviewers

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

        Parameters:
        reviewers - the value to set
        Returns:
        this builder
      • minApprovalsCount

        public 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
        Parameters:
        minApprovalsCount - the value to set
        Returns:
        this builder