Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix automerge will not work because of some events haven't been triggered #30780
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 automerge will not work because of some events haven't been triggered #30780
Changes from all commits
f51af18
d145c26
0dc9531
e4e24d2
db6e278
a5d0708
b208bde
c1eac83
3ec2753
b541467
ed361d2
f5e4176
531e8db
9331ccd
8ecfb7d
7d14dfc
51e4888
797236c
5c0f00a
44b306a
ee1aba3
0d4cce7
438d880
fd8dda3
93c9739
deeea79
8331fa0
d9e8a42
e447ec2
8d98ed5
a0adfd5
1c202fa
56914ed
63b74a2
a5f0397
9680940
894537c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Why not make
StartPRCheckAndAutoMergeBySHA
callStartPRCheckAndAutoMerge
to avoid duplicate code?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.
They are two different functions. I think less code are duplicated.
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.
Actually I don't see why
sha
should be passed intoaddToQueue
It seems that the
sha
is only used for logging. Ideally only calladdToQueue(pr.ID)
should be enough, and a lot of code could be simplified?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.
I think the SHA will prevent when both an automerge task and a newly push are triggered. So the previous triggered automerge task will be ignored.
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.
Actually such check doesn't seem right and only makes some problem harder to debug.
Because, the head commit ID could change again after that check.
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.
Yes, it's not perfect. It needs more refactor like I said before. But since it's a bugfix, I will not do it in this PR.