Repository navigation
Conversation
|
The description doesn't sound correct so I am trying to determine actual intent: Why would we need 1p-approval if we are reducing the require approval count to 1. You would need a 2p-approval label if reducing the rules. Or are the required approvals staying at 2? |
| name: Required Approvals | ||
|
|
||
| # Enforces the number of approvals required to merge a PR. Only approvals from users with | ||
| # write (or higher) permission count. Two approvals are required by default; one approval is |
There was a problem hiding this comment.
If it does this I am ok with it but this isn't what the description in the PR says that we will reduce approvals to 1.
There was a problem hiding this comment.
I reworded the PR description to be more clear. Describing this change as adding an opt-in mechanism to reduce to 1p for small PRs.
| required = 1; | ||
| labelStatus = `applied by ${labeler}`; | ||
| } else { | ||
| labelStatus = `ignored, applied by ${labeler ?? 'unknown'} who does not have write access`; |
There was a problem hiding this comment.
It will go into the ignore applied by ... even if it wasn't a labeledEvent. If it isn't a labeled event it likely shouldn't say either message.
There was a problem hiding this comment.
I lean towards keeping the info. It would just be extra information that may be useful. For example if a non-writer added the label and then the author pushed another commit somebody might be confused why the action didn't pass after seeing the label and the one approver. Ultimately the extra does harm anything and just adds complexity by filtering for non label events.
Description of changes:
To cut down the boiler plate time for smaller PR we want to experiment with allowing small PRs to opt-in to reducing reviewer approval to 1 person. By default 2 people will still be required unless the
1p-approvallabel is applied by somebody withwriteoradminpermissions.The PR adds the GitHub action that will enforce that 2 people with
writeoradminaccess has approved the PR. After this PR is merged we'll change the GitHub settings to reduce the required approval count to 1 and create the1p-approvallabel.The action works by running on new PRs being changed or labels applied or removed. It will fail if there are not 2 approvals or 1 approval and the
1p-approvallabel is not applied.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.