RFR: 1424: CheckRun fails to evaluate jol#24
Erik Joelsson
erikj at openjdk.java.net
Tue May 3 18:39:47 UTC 2022
CheckRun, which is part of the PullRequestBot, is currently failing to evaluate https://github.com/openjdk/jol/pull/24. The failure happens in PullRequestUtils::containsForeignMerge where we are looking for merges in the PR branch which bring in commits that aren't descendants of the main merge parent. If this test is positive, the bot adds a comment with a warning.
The problem is that GitRepository::mergeBase doesn't differentiate between the git command failing with an error and when it just can't find a merge-base. For this check, a non existent merge-base should qualify for a positive test.
I'm refactoring Repository::mergeBase into two methods, one that returns an Optional, which will be empty when a merge-base can't be found. I've also gone through all callers to identify when the new method should be used to properly tell this situation apart.
-------------
Commit messages:
- SKARA-1424
Changes: https://git.openjdk.java.net/skara/pull/1312/files
Webrev: https://webrevs.openjdk.java.net/?repo=skara&pr=1312&range=00
Issue: https://bugs.openjdk.java.net/browse/SKARA-1424
Stats: 35 lines in 3 files changed: 26 ins; 3 del; 6 mod
Patch: https://git.openjdk.java.net/skara/pull/1312.diff
Fetch: git fetch https://git.openjdk.java.net/skara pull/1312/head:pull/1312
PR: https://git.openjdk.java.net/skara/pull/1312
More information about the skara-dev
mailing list