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

fix: [auto-approve] add event listener for pull request dismissed #5333

Merged
merged 4 commits into from
Jun 11, 2024

Conversation

sofisl
Copy link
Contributor

@sofisl sofisl commented Jun 6, 2024

I noticed in googleapis/nodejs-pubsub#1927 that merge-on-green kept dismissing auto-approve's latest review due to post-processor updates, other commits, etc. Ideally, those commits would retrigger auto-approve to re-review the PR. But there seems to be a race condition where sometimes merge-on-green beats auto-approve to re-approving and dismisses the PR. This fix would allow auto-approve to listen to reviews dismissed, so that it always has a chance to re-review the most recent commit when an automerge: exact label has been placed.

As part of this work, the pull_request_review.dismissed event needs to access the pr number through pull_request.number, so I had to update this for all the events and make sure the test fixtures had the appropriate number there too.

Fixes #5096

@sofisl sofisl requested a review from chingor13 June 6, 2024 17:19
@sofisl sofisl changed the title chore: add event listener for auto-approve fix: [auto-approve] add event listener for pull request dismissed Jun 6, 2024
@sofisl sofisl merged commit f4d9b27 into main Jun 11, 2024
21 checks passed
@sofisl sofisl deleted the addEventListener branch June 11, 2024 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

merge on green: 'automerge: exact' catches up branch and allows MoG merge commits
2 participants