RFR: 1707: Bot warns about "No .jcheck/conf found" when it should not [v2]
Zhao Song
zsong at openjdk.org
Mon Dec 5 22:27:41 UTC 2022
On Mon, 5 Dec 2022 22:12:23 GMT, Erik Joelsson <erikj at openjdk.org> wrote:
>> Zhao Song has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Update bots/pr/src/main/java/org/openjdk/skara/bots/pr/LimitedCensusInstance.java
>>
>> Co-authored-by: Erik Joelsson <37597443+erikj79 at users.noreply.github.com>
>
> bots/pr/src/main/java/org/openjdk/skara/bots/pr/LimitedCensusInstance.java line 77:
>
>> 75: } catch (UncheckedRestException e) {
>> 76: // Throw the exception if the error is not exactly "File not found"
>> 77: if (e.getStatusCode() != 404 || e.getBody().contains("Commit Not Found") || e.getBody().contains("No commit found")) {
>
> We should check for precisely "File Not Found" or "Not found".
>
> Suggestion:
>
> if (e.getStatusCode() != 404 || (!e.getBody().equals("File Not Found") && !e.getBody().equals("Not found"))) {
Yes, it will be better. Thanks!
-------------
PR: https://git.openjdk.org/skara/pull/1435
More information about the skara-dev
mailing list