Skip to content

Prevent merging PRs which have CI checks run a week+ ago#46177

Merged
mkArtakMSFT merged 3 commits into
mainfrom
mkArtakMSFT-patch-1
Jan 25, 2023
Merged

Prevent merging PRs which have CI checks run a week+ ago#46177
mkArtakMSFT merged 3 commits into
mainfrom
mkArtakMSFT-patch-1

Conversation

@mkArtakMSFT
Copy link
Copy Markdown
Contributor

No description provided.

@mkArtakMSFT mkArtakMSFT added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Jan 19, 2023
@mkArtakMSFT mkArtakMSFT requested review from a team, dougbu and wtgodbe as code owners January 19, 2023 23:01
@ghost
Copy link
Copy Markdown

ghost commented Jan 19, 2023

Hey @dotnet/aspnet-build, looks like this PR is something you want to take a look at.

Copy link
Copy Markdown
Member

@wtgodbe wtgodbe left a comment

Choose a reason for hiding this comment

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

LGTM - I asked other folks on the team for feedback, so let's wait a bit to see if anybody has other thoughts

Copy link
Copy Markdown
Member

@wtgodbe wtgodbe left a comment

Choose a reason for hiding this comment

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

Actually, can we change the approve action to only approve if somebody else has already approved the PR? That way we don't accidentally merge any PRs that have only been reviewed by fabricbot. Or just remove the rejection without approving?

@mkArtakMSFT
Copy link
Copy Markdown
Contributor Author

can we change the approve action to only approve if somebody else has already approved the PR?

Can't find anything relevant :(
image

@wtgodbe
Copy link
Copy Markdown
Member

wtgodbe commented Jan 19, 2023

Hmm, maybe lock when adding the label and unlock when removing then?

EDIT - never mind, that locks the conversation. I have some concern about the bot approving PRs that may not have been approved by anyone else yet - maybe a malicious person could find that there's a way to get their PR approved without anybody actually looking at it. Maybe instead the bot adds the blocked label or the no-merge label at the same time it adds the rerun-CI label, and we remove the follow-up action? Then the dev could just remove both labels themselves. Curious to see what others think about this, though.

@HaoK
Copy link
Copy Markdown
Member

HaoK commented Jan 20, 2023

Could we instead just have the bot do /azp run on old green non-draft PRs?

@dougbu
Copy link
Copy Markdown
Contributor

dougbu commented Jan 20, 2023

Could we instead just have the bot do /azp run on old green non-draft PRs?

We discussed that option but realized aspnetcore alone has many PRs that would get an /azp run in them, which may have a significant resource impact. This way the runs happen only when the owner or one of the repo collaborators feels the PR is actually ready to go.

On the other hand, there's a related point about servicing PRs: Because those often sit while the branches are closed and very rarely hit breaking changes from other PRs, might be good to focus on 'main' w/ this new action.

Comment thread .github/fabricbot.json Outdated
Co-authored-by: Doug Bunting <6431421+dougbu@users.noreply.github.com>
@mkArtakMSFT
Copy link
Copy Markdown
Contributor Author

Instead of approving the PR, maybe we should not do any of it, and instead just automate further by dropping an /azp run when the pending-ci-rerun label is removed?

Copy link
Copy Markdown
Contributor

@dougbu dougbu left a comment

Choose a reason for hiding this comment

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

I suspect this is fine but have one concern…

Comment thread .github/fabricbot.json
@mkArtakMSFT
Copy link
Copy Markdown
Contributor Author

@wtgodbe waiting for your feedback here.

Copy link
Copy Markdown
Member

@wtgodbe wtgodbe left a comment

Choose a reason for hiding this comment

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

Works for me

@mkArtakMSFT mkArtakMSFT merged commit e4448a5 into main Jan 25, 2023
@mkArtakMSFT mkArtakMSFT deleted the mkArtakMSFT-patch-1 branch January 25, 2023 03:59
@ghost ghost added this to the 8.0-preview1 milestone Jan 25, 2023
@Nick-Stanton
Copy link
Copy Markdown
Member

@mkArtakMSFT @wtgodbe @dougbu

image

Encountered this here

@ghost
Copy link
Copy Markdown

ghost commented Jan 27, 2023

Hi @Nick-Stanton. It looks like you just commented on a closed PR. The team will most probably miss it. If you'd like to bring something important up to their attention, consider filing a new issue and add enough details to build context.

@github-actions github-actions Bot locked and limited conversation to collaborators Dec 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants