-
-
Notifications
You must be signed in to change notification settings - Fork 12.4k
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
automerge: run on failed merge_group
events
#173010
Conversation
This depends a lot on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the logic is: click "merge when ready", merge group CI fails, then automerge is run where the real merge happens?
The "merge group CI fails" part could be a bit counterintuitive, but I guess this does work provided merge group CI fails in appropriate cases.
I think this is probably unavoidable given that:
I'd be happy with this as a solution 👍🏻 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me! Worth a try, thanks for this @carlocab!
Is there a risk of an infinite loop here? |
Possibly, yes. It seemed like a possibility to me as I was writing this down, but I haven't yet worked out definitively either way. |
@carlocab could consider applying a label at some stage as a marker to avoid this? |
c974408
to
be1f923
Compare
I had to rework this.
Unfortunately, This meant I had to write a new GraphQL query that does find the associated PR. I've also written another query that checks the PR timeline for removed-from-merge-queue events so that we can exit with an error when we see too many of those (in order to avoid infinite loops). However, there is still quite a bit of overlap with the |
be1f923
to
8811b4a
Compare
I took the more direct approach of checking the PR timeline for too many removed-from-merge-queue events. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work @carlocab!
Closes #172999
(maybe)