RFR: 1729: CSR bot should not remove CSR label if one of the CSR issues is withdrawn [v2]

Erik Joelsson erikj at openjdk.org
Mon Jan 9 21:46:39 UTC 2023

On Mon, 9 Jan 2023 20:15:10 GMT, Zhao Song <zsong at openjdk.org> wrote:

>> While testing [SKARA-1714](https://bugs.openjdk.org/browse/SKARA-1714), I discovered a bug in the PullRequestWorkItem of the CSR bot. 
>> Currently, the CSR bot would remove CSR label if all the CSR issues of the pr is closed(whether approved or withdrawn). However, if the CSR label is added via using '/csr needed' command and the pr contains withdrawn CSR issues, the CSR should not remove the CSR label.
> Zhao Song has updated the pull request incrementally with one additional commit since the last revision:
>   changed the logic about removing CSR label when pr contains withdrawn csr issue

bots/csr/src/main/java/org/openjdk/skara/bots/csr/PullRequestWorkItem.java line 267:

> 265:      * Determine whether the CSR label is added via '/csr needed' command
> 266:      */
> 267:     private boolean CSRNeeded(List<Comment> comments) {

Please always use lower case at start of method. I would suggest `isCSRNeeded`

bots/csr/src/main/java/org/openjdk/skara/bots/csr/PullRequestWorkItem.java line 277:

> 275:             }
> 276:         }
> 277:         return CSRNeededCommentCount > 0;

I don't think this should be determined by count. The last comment with `` in it is the one that is currently in effect.


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

More information about the skara-dev mailing list