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

Erik Joelsson erikj at openjdk.java.net
Mon Apr 18 21:03:49 UTC 2022


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.

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

Commit messages:
 - SKARA-1400

Changes: https://git.openjdk.java.net/skara/pull/1300/files
 Webrev: https://webrevs.openjdk.java.net/?repo=skara&pr=1300&range=00
  Issue: https://bugs.openjdk.java.net/browse/SKARA-1400
  Stats: 7 lines in 1 file changed: 5 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/skara/pull/1300.diff
  Fetch: git fetch https://git.openjdk.java.net/skara pull/1300/head:pull/1300

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


More information about the skara-dev mailing list