Integrated: 2065: Update PR labels when new files are touched
Zhao Song
zsong at openjdk.org
Mon Sep 15 20:56:05 UTC 2025
On Mon, 25 Aug 2025 21:23:12 GMT, Zhao Song <zsong at openjdk.org> wrote:
> This patch is trying to make the pr bot be able to update PR labels when new files are touched.
> The main idea is from Erik. For a new PR, the bot will run a labelerWorkItem to auto label the PR first, and the commit hash will be stored in a comment.
>
> With this patch, here are some new behaviors of the bot:
> (1) The user didn't issue manual label command before auto labeling, LabelerWorkItem will do the initial auto labeling and store the commit hash in the comment.
> (2) If the user issued manual label command before auto labeling, the initial auto labeling will be skipped, the bot would still post a comment and store the hash in the comment.
> (3) The user pushes a new commit or few commits to a pr that already auto labeled, the bot will evaluate the diff between stored hash and current head, then add new labels or upgrading labels to group labels, in the end, update the stored hash in the comment.
> (4) The user force pushes to the pr that already auto labeled, the bot will evaluate the diff between baseHash and current head.
> (5) The user issues a command to add a label to the pr(or even the user add the label via the forge UI), the bot will check if the labels can be upgraded to group labels.
>
> The side effect of this feature I can imagine is that a user thinks a file is not related to a component and removed it manually, but later, every time when he touches the file, the label will be added back.
This pull request has now been integrated.
Changeset: b0ce8b9c
Author: Zhao Song <zsong at openjdk.org>
URL: https://git.openjdk.org/skara/commit/b0ce8b9c360222e4f2522a3d80a29bf0a14ee1f7
Stats: 437 lines in 13 files changed: 272 ins; 65 del; 100 mod
2065: Update PR labels when new files are touched
Reviewed-by: erikj
-------------
PR: https://git.openjdk.org/skara/pull/1735
More information about the skara-dev
mailing list