ApprovalRule

class oci.devops.models.ApprovalRule(**kwargs)

Bases: object

A rule which must be satisfied for matching pull requests before the pull request can be merged

Methods

__init__(**kwargs) Initializes a new ApprovalRule object with values from keyword arguments.

Attributes

destination_branch Gets the destination_branch of this ApprovalRule.
min_approvals_count [Required] Gets the min_approvals_count of this ApprovalRule.
name [Required] Gets the name of this ApprovalRule.
reviewers Gets the reviewers of this ApprovalRule.
__init__(**kwargs)

Initializes a new ApprovalRule object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters:
  • name (str) – The value to assign to the name property of this ApprovalRule.
  • destination_branch (str) – The value to assign to the destination_branch property of this ApprovalRule.
  • reviewers (list[oci.devops.models.PrincipalDetails]) – The value to assign to the reviewers property of this ApprovalRule.
  • min_approvals_count (int) – The value to assign to the min_approvals_count property of this ApprovalRule.
destination_branch

Gets the destination_branch of this ApprovalRule. 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

Returns:The destination_branch of this ApprovalRule.
Return type:str
min_approvals_count

[Required] Gets the min_approvals_count of this ApprovalRule. Minimum number of approvals which must be provided by the reviewers specified in the list before the rule can be satisfied

Returns:The min_approvals_count of this ApprovalRule.
Return type:int
name

[Required] Gets the name of this ApprovalRule. Name which is used to uniquely identify an approval rule.

Returns:The name of this ApprovalRule.
Return type:str
reviewers

Gets the reviewers of this ApprovalRule. 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.

Returns:The reviewers of this ApprovalRule.
Return type:list[oci.devops.models.PrincipalDetails]