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

Move blessed mergable PRs into new column, fix blessed PRs with partial approvals #1046

Merged
merged 6 commits into from
Aug 9, 2024

Conversation

jakebailey
Copy link
Member

@jakebailey jakebailey commented Aug 8, 2024

The new test reveals that blessing also bypasses needing all owners of modified packages to approve. Working on figuring that one out.

Copy link
Member

@sandersn sandersn left a comment

Choose a reason for hiding this comment

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

Code looks OK but I don't think I know how to use this feature.


const blessedColumnNames = [
"Waiting for Code Reviews (Blessed)",
"Waiting for Author to Merge (Blessed)",
Copy link
Member

Choose a reason for hiding this comment

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

does the weekly maintainer have to know which (Blessed) column to move to?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, they should only ever put something into the first one, since I removed the "straight to mergable" thing.

@jakebailey
Copy link
Member Author

The PR's not yet complete; working on a fix for the blessed PRs overriding any other reviews thing.

Comment on lines -117 to -119
const approvedBy = getApprovedBy();
const pendingCriticalPackages = getPendingCriticalPackages();
const approverKind = getApproverKind();
Copy link
Member Author

Choose a reason for hiding this comment

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

Dropped some of these to make them less of a hazard for code below; a lot of code was incorrectly reading out reviews for one package and applying them to the whole.

@jakebailey jakebailey changed the title Move blessed mergable PRs into new column Move blessed mergable PRs into new column, fix blessed PRs with partial approvals Aug 9, 2024
@jakebailey
Copy link
Member Author

I don't think I know how to use this feature.

The use is just: If there's a PR in "needs maintainer review" and you think it's not doing anything harmful such that an owner can make the final decision, move the PR to "Waiting for Code Reviews (blessed)".

If all authors approve, it will eventually move to "Waiting for Merge (Blessed)" and be eligible for a self merge. If someone at any point complains, it leaves the "blessed" part of the flow, dropping back into "Needs Author Action", or eventually back into the maintainer queue.

Copy link
Member

@sandersn sandersn left a comment

Choose a reason for hiding this comment

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

Looks good. One very optional suggestion about enums.

@@ -53,6 +67,12 @@ export const labelNames = [

export type ApproverKind = "maintainer" | "owner" | "other";
Copy link
Member

Choose a reason for hiding this comment

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

stupid idea (because the code is already good enough): why not export type ApproverKind = (typeof approverKindOrder)[number] ?

but also: numeric enums give you all the features you need with enum ApproverKind { None, Other, Owner, Maintainer } to simplify getMaxApproverKind.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll do the former one, but I was avoiding the latter because the ApproverKind is a part of baselines and will end up showing up in the dumped JSON as regular numbers.

@jakebailey jakebailey merged commit 55c5cf2 into microsoft:main Aug 9, 2024
7 checks passed
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