RFR: 2065: Update PR labels when new files are touched [v2]
Zhao Song
zsong at openjdk.org
Thu Aug 28 22:04:15 UTC 2025
On Thu, 28 Aug 2025 21:43:46 GMT, Zhao Song <zsong at openjdk.org> wrote:
>> bots/pr/src/main/java/org/openjdk/skara/bots/pr/PullRequestCommandWorkItem.java line 198:
>>
>>> 196:
>>> 197: if (!pr.isClosed()) {
>>> 198: return List.of(new LabelerWorkItem(bot, prId, errorHandler, triggerUpdatedAt));
>>
>> At this stage in PullRequestCommandWorkItem, we have already loaded all PR comments, so I think it would be worth checking if there is any need for scheduling a LabelerWorkItem. What I mean is, we can check if the head hash of the PR is different from the last labeler commit marker. This could be implemented in a static method on `LabelereWorkItem` to keep the details in one place.
>
> When I was working on it, I have the same thought with you, I added the check and did some tests, later I found there is a case which is that the user use the "/label" command to add the label, in this case, we need LabelerWorkItem to check whether the labels can be upgraded to group labels.
Or there is another Option, we can add the check here. And in pullRequestWorkItem, after processing a label command, we can schedule a LabelerWorkItem
-------------
PR Review Comment: https://git.openjdk.org/skara/pull/1735#discussion_r2308645445
More information about the skara-dev
mailing list