Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Label based approver group conditions #565

Open
startnow65 opened this issue Feb 11, 2019 · 0 comments
Open

Support Label based approver group conditions #565

startnow65 opened this issue Feb 11, 2019 · 0 comments

Comments

@startnow65
Copy link
Contributor

startnow65 commented Feb 11, 2019

This is to support defining approver group requirement "activations" based on labels on a pull request.

With this sample config:

approvals:
  ignore: pr_opener
  minimum: 1
  pattern: ^(Approved|\+1|:\+1:|:shipit:)
  veto:
    pattern: ^(Rejected|\-1|:\-1:)
  groups:
    all_reviewers:
      from:
        orgs:
        - sample_org
      minimum: 2
    dev_only:
      from:
        users:
        - dev_1
        - dev_2
        - dev_3
        - dev_4
      minimum: 2
      conditions:
        labels:
          include:
          - dev_reviewed
    strong_reviewers:
      from:
        users:
        - strong_reviewer_1
        - strong_reviewer_2
        - strong_reviewer_3
      minimum: 1
      conditions:
        labels:
          exclude:
          - dev_reviewed
  • Approver group dev_only is only activated if label dev_reviewed is present on the PR. If this label is present, then at least two members (as specified by the minimum key of the group) of the group must approve the PR, if not, this requirement is not enforced.
  • Approver group strong_reviewers is only activated if label dev_reviewed is NOT present on the PR. If this label is present, then this requirement is not enforced, if not, at least one member (as specified by the minimum key of the group) of the group must approve the PR
  • Approver group all_reviewers works as before
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant