Skip to content

Add 1 person override GitHub action - #2590

Open
normj wants to merge 1 commit into
masterfrom
normj/ga-1p
Open

normj wants to merge 1 commit into
masterfrom
normj/ga-1p

Conversation

@normj

@normj normj commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

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-approval label is applied by somebody with write or admin permissions.

The PR adds the GitHub action that will enforce that 2 people with write or admin access 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 the 1p-approval label.

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-approval label is not applied.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@normj
normj requested review from a team as code owners October 7, 2026 20:22
@boblodgett

boblodgett commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

The description doesn't sound correct so I am trying to determine actual intent:

After this PR is merged we'll change the GitHub settings to reduce the required approval count to 1 and create the 1p-approval label.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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`;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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

Successfully merging this pull request may close these issues.

2 participants