-
Notifications
You must be signed in to change notification settings - Fork 44
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
More fixes #190
Merged
Merged
More fixes #190
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
`Staleness.Abandoned` can happen for PRs that don't require author attention now. Instead of closing them, make them also go to `NMA`. (This replaces the "internal error" that happens now.)
`createWelcomeComment`: remove the computed `waitingOnThePRAuthorToMerge` and use `canBeMergedNow(info)` instead, so the welcome comment is in sync with the `Merge:Auto` label. Closes #177.
Send a few dates to `usersSayReadyToMerge`, which uses them to check for a comment with that content that was added *after* these dates. So, for example, if that comment was added and only later a review came in (that makes auto-merging possible), then that comment will be ignored. Note that this does *not* include comment dates, so even if someone posted a comment after the request (in the short time that the bot waits before acting), it will still get merged. Fixes #164.
orta
approved these changes
Aug 31, 2020
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.
Lot of fixes in a pretty small amount of code 👍🏻
elibarzilay
pushed a commit
to jablko/dt-mergebot
that referenced
this pull request
Oct 16, 2020
Since DefinitelyTyped#190 we ignore "ready to merge" comments predating the most recent review. That change explicitly discounts the most recent comment date, so additional comments don't trample the "ready to merge" request, however additional approvals still do: DefinitelyTyped/DefinitelyTyped#48236 We can't drop the `lastReviewDate` from the `sinceDates` entirely without reopening DefinitelyTyped#164, demonstrated in DefinitelyTyped/DefinitelyTyped#46120, so the next simplest thing is to replace it with the earliest (non-stale) approval date. This works for DefinitelyTyped/DefinitelyTyped#46120 (continues to ignore requests preceding approval) and DefinitelyTyped/DefinitelyTyped#48236 (additional approvals don't trample requests, like additional comments don't).
elibarzilay
pushed a commit
that referenced
this pull request
Oct 16, 2020
Since #190 we ignore "ready to merge" comments predating the most recent review. That change explicitly discounts the most recent comment date, so additional comments don't trample the "ready to merge" request, however additional approvals still do: DefinitelyTyped/DefinitelyTyped#48236 We can't drop the `lastReviewDate` from the `sinceDates` entirely without reopening #164, demonstrated in DefinitelyTyped/DefinitelyTyped#46120, so the next simplest thing is to replace it with the earliest (non-stale) approval date. This works for DefinitelyTyped/DefinitelyTyped#46120 (continues to ignore requests preceding approval) and DefinitelyTyped/DefinitelyTyped#48236 (additional approvals don't trample requests, like additional comments don't).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Three fixes (each in its own commit, to make it easier to review).
Fix expectation for "Abandoned" state
Staleness.Abandoned
can happen for PRs that don't require authorattention now. Instead of closing them, make them also go to
NMA
. (This replaces the "internal error" that happens now.)Use
canBeMergedNow
consistentlycreateWelcomeComment
: remove the computedwaitingOnThePRAuthorToMerge
and usecanBeMergedNow(info)
instead, sothe welcome comment is in sync with the
Merge:Auto
label.Closes #177.
Ignore outdated "ready to merge" comments
Send a few dates to
usersSayReadyToMerge
, which uses them to check fora comment with that content that was added after these dates. So, for
example, if that comment was added and only later a review came in (that
makes auto-merging possible), then that comment will be ignored. Note
that this does not include comment dates, so even if someone posted a
comment after the request (in the short time that the bot waits before
acting), it will still get merged.
Fixes #164.