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

Don't ignore "ready to merge" followed by additional approvals #197

Merged
merged 2 commits into from
Oct 16, 2020

Conversation

jablko
Copy link
Contributor

@jablko jablko commented Oct 5, 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
Copy link
Contributor

This looks like a reasonable thing to do. IIUC, it works because the loop considers only reviews for the current head commit, so there's no problem with finding an approval that came in and was followed by further commits.

(Like your other PRs, I want to keep an eye on the bot after such changes, so I'll merge it when it's my cycle.)

@jablko
Copy link
Contributor Author

jablko commented Oct 13, 2020

That'd be great, thanks!

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).
* Adjust new test to other changes to file checking.

* Move the code that makes `firstApprovalDate` next to `lastReviewDate`.

* Make it compare the dates in the same way that `lastReviewDate` is
  done, to avoid relying on the order of entries.

* Also move it in the json and adjust tests.
@elibarzilay elibarzilay merged commit 72404d3 into DefinitelyTyped:master Oct 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants