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

More fixes #190

Merged
merged 3 commits into from
Aug 31, 2020
Merged

More fixes #190

merged 3 commits into from
Aug 31, 2020

Conversation

elibarzilay
Copy link
Contributor

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 author
attention now. Instead of closing them, make them also go to
NMA. (This replaces the "internal error" that happens now.)

Use canBeMergedNow consistently

createWelcomeComment: remove the computed
waitingOnThePRAuthorToMerge and use canBeMergedNow(info) instead, so
the 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 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.

`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.
Copy link
Contributor

@orta orta left a 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 elibarzilay merged commit a7e5ebe into DefinitelyTyped:master Aug 31, 2020
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).
@elibarzilay elibarzilay deleted the more-fixes branch October 28, 2020 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants