RFR: SKARA-1096: New command and label for JEPs, similar to CSR [v5]

Guoxiong Li gli at openjdk.java.net
Fri Apr 15 06:48:28 UTC 2022


On Thu, 14 Apr 2022 13:05:34 GMT, Erik Joelsson <erikj at openjdk.org> wrote:

>> If change operations are done in the right order, it wouldn't be a problem. In this case, if the jep command added the label after the comment, it would be fine without synchronization. One can also argue that this issue will self correct anyway. The JEPBot will see the correct comment eventually and restore the label. The downside is that until that happens (which can easily take enough time to be confusing to users), the PR will show that the JEP has been targeted.
>
> I pondered on this some more and I think we can fix it. We can extend `CommandHandler::handle` for PRs with another parameter for returning a collection of labels to add to the PR. PullRequestCommandWorkItem calls this with an empty collection and any command that needs to add labels after the reply is posted can add them to this collection.

Good idea. Actually, we also need to remove labels sometimes, such as the command `/jep unneeded`. What about returning a pair collections like `<labelsToAdd, labelsToRemove>` ?

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

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


More information about the skara-dev mailing list