Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

Commit

Permalink
Merge pull request #49 from product-os/kyle/block_contributor
Browse files Browse the repository at this point in the history
Fix cases where authors were still allowed to self-certify
  • Loading branch information
flowzone-app[bot] authored Dec 19, 2023
2 parents c9cb3b9 + 3816387 commit 9147c7c
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 6 deletions.
11 changes: 10 additions & 1 deletion policies/approval.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,24 @@ approval_rules:
comment_patterns: *approvalCommentPatterns
github_review: true

# forks are allowed in this block so the rules are strict
# like invalidate on push and no self-certify
- name: reviewers have approved with invalidate on push

requires:
count: 1
permissions: ["write"]

options:
# disable self-certify
# If true, approvals by the author of a pull request are considered when
# calculating the status. False by default.
allow_author: false
allow_contributor: true
# If true, the approvals of someone who has committed to the pull request are
# considered when calculating the status. The pull request author is considered
# a contributor. If allow_author and allow_contributor would disagree, this option
# always wins. False by default.
allow_contributor: false
invalidate_on_push: true
ignore_edited_comments: true

Expand Down
24 changes: 19 additions & 5 deletions policies/no-self-certify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,15 @@ approval_rules:
permissions: ["write"]

options:
# disable self-certify
# If true, approvals by the author of a pull request are considered when
# calculating the status. False by default.
allow_author: false
allow_contributor: true
# If true, the approvals of someone who has committed to the pull request are
# considered when calculating the status. The pull request author is considered
# a contributor. If allow_author and allow_contributor would disagree, this option
# always wins. False by default.
allow_contributor: false
invalidate_on_push: false
ignore_edited_comments: true

Expand All @@ -52,15 +59,22 @@ approval_rules:
permissions: ["write"]

options:
# disable self-certify
# If true, approvals by the author of a pull request are considered when
# calculating the status. False by default.
allow_author: false
allow_contributor: true
# If true, the approvals of someone who has committed to the pull request are
# considered when calculating the status. The pull request author is considered
# a contributor. If allow_author and allow_contributor would disagree, this option
# always wins. False by default.
allow_contributor: false
invalidate_on_push: true
ignore_edited_comments: true

methods:
comments: []
comment_patterns: *approvalCommentPatterns
github_review: true
comments: []
comment_patterns: *approvalCommentPatterns
github_review: true

- name: auto-approved via no-review label
if:
Expand Down

0 comments on commit 9147c7c

Please sign in to comment.