Integrated: 1400: GitlabMergeRequest sometimes associates reviews with the wrong commit

Erik Joelsson erikj at openjdk.java.net
Mon Apr 18 22:32:32 UTC 2022


On Mon, 18 Apr 2022 20:59:01 GMT, Erik Joelsson <erikj at openjdk.org> wrote:

> GitlabMergeRequset::reviews can sometimes associate a review with the wrong commit. This can happen if multiple commits have the same "created_at" date (the date the commit was pushed to gitlab). In this case, sorting on date will leave the older commit last. When later comparing the date of each commit with the date of a review note, the older commit gets picked.
> 
> The consequence of this is that a review can end up stuck with "Re-review required" if the repository requires new reviews for new commits.
> 
> This patch fixes this by first reversing the order of the commits and then trusting the stable sort to keep any commits considered equal in the correct (reversed) order.

This pull request has now been integrated.

Changeset: 3a889291
Author:    Erik Joelsson <erikj at openjdk.org>
URL:       https://git.openjdk.java.net/skara/commit/3a889291b80d8ac52a780ebfc7e08cfd2a46a4c8
Stats:     7 lines in 1 file changed: 5 ins; 0 del; 2 mod

1400: GitlabMergeRequest sometimes associates reviews with the wrong commit

Reviewed-by: kcr

-------------

PR: https://git.openjdk.java.net/skara/pull/1300


More information about the skara-dev mailing list