RFR: 1707: Bot warns about "No .jcheck/conf found" when it should not [v5]

Magnus Ihse Bursie ihse at openjdk.org
Tue Dec 6 19:48:44 UTC 2022


On Tue, 6 Dec 2022 19:00:05 GMT, Zhao Song <zsong at openjdk.org> wrote:

>> bots/common/src/main/java/org/openjdk/skara/bots/common/BotUtils.java line 46:
>> 
>>> 44:         String confFile;
>>> 45:         confFile = pr.repository().fileContents(".jcheck/conf", pr.headHash().hex())
>>> 46:                 .orElse(pr.repository().fileContents(".jcheck/conf", pr.targetRef()).orElseThrow());
>> 
>> Could you add a message to the exception in orElseThrow describing what's happening. Something like
>> 
>> () -> new RuntimeException("Missing .jcheck/conf in both src and target of PR " + pr)
>> 
>> 
>> Also, no need to split declaration of confFile to a separate line anymore, nor declare the type.
>
> Sure, will fix it

But Eriks suggested message sounds a bit contradictory. I suggest instead using:
"Could not find .jcheck/conf in neither src or target of PR"

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

PR: https://git.openjdk.org/skara/pull/1435


More information about the skara-dev mailing list