RFR: 1271: Webrev generation should be optional

Zhao Song zsong at openjdk.org
Thu Feb 16 21:46:07 UTC 2023


On Thu, 16 Feb 2023 19:22:21 GMT, Erik Joelsson <erikj at openjdk.org> wrote:

>> Currently, webrevs are generated automatically when a user pushes a new commit, and it's mandatory to choose either JSON or HTML when configuring the mlbridge bot. If both of them are disabled in the configuration, the bot will throw errors.
>> 
>> In this patch, generating a webrev will be optional. If both JSON and HTML are disabled, no webrev will be generated.
>
> bots/mlbridge/src/main/java/org/openjdk/skara/bots/mlbridge/ArchiveMessages.java line 332:
> 
>> 330:         if (webrevs.size() > 0) {
>> 331:             if (webrevs.stream().noneMatch(w -> w.uri() != null)) {
>> 332:                 webrevLinks = "Webrev is disabled\n\n";
> 
> I think this should just be `""` or possibly `"\n"`, not sure.

else {
            webrevLinks = "The merge commit only contains trivial merges, so no merge-specific webrevs have been generated.\n\n";
        }

I just tried to align with this.

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

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


More information about the skara-dev mailing list