RFR: 1256: Use stream api to simplify the csr issue lookup [v4]

Guoxiong Li gli at openjdk.java.net
Wed Dec 1 19:01:50 UTC 2021


On Wed, 1 Dec 2021 17:42:07 GMT, Erik Joelsson <erikj at openjdk.org> wrote:

>> Guoxiong Li has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Encapsulate the csrLink method.
>
> bots/pr/src/main/java/org/openjdk/skara/bots/pr/CSRCommand.java line 118:
> 
>> 116:             if (csrOptional.isEmpty()) {
>> 117:                 // The csr link exists but the csr issue doesn't exist.
>> 118:                 // We should remind the user to remove the link firstly.
> 
> I missed this in the previous patch.
> 
> I don't think we can ask the user to remove a broken link in JBS. I'm pretty sure that would require admin actions. Here we should just treat it as if the link didn't exist and remove the label.

Fixed.

> bots/pr/src/main/java/org/openjdk/skara/bots/pr/CSRCommand.java line 132:
> 
>> 130:                     || !resolution.get("name").asString().equals("Withdrawn")) {
>> 131:                 // The issue has a non-withdrawn csr issue, the bot should direct the user to withdraw the csr firstly.
>> 132:                 reply.println("the issue for this pull request, [" + jbsIssue.get().id() + "](" + jbsIssue.get().webUrl() + "), has " +
> 
> I missed this in the previous patch. The language of this reply needs some work. Here is my suggestion.
> 
> "The CSR requirement cannot be removed as there already is a CSR associated with the main issue of this pull request. Please withdraw the CSR [link] and then use the command '/csr unneeded' again."

Fixed.

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

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


More information about the skara-dev mailing list