RFR: 2065: Update PR labels when new files are touched [v4]
Zhao Song
zsong at openjdk.org
Fri Aug 29 16:04:59 UTC 2025
On Fri, 29 Aug 2025 13:43:38 GMT, Erik Joelsson <erikj at openjdk.org> wrote:
> What Magnus said got me thinking. Since we are now redoing auto labeling every time the code changes, I think the concept of having the bot class track which PRs have been auto labeled doesn't make much sense. A PR is either up to date with the labeler, or it isn't. There shouldn't be anything special about the first run really. In CheckRun, to check if the PR has been auto labeled or not, it can check for the existence of an auto label comment. In LabelerWorkItem, I think the code paths could be more unified to make it clear that there isn't a big difference.
>
> I'm thinking that when running the LabelerWorkItem again, due to a new commit, if nothing new is found, we just silently update the commit hash in the existing (last) auto label comment. If however we find that a new label needs to be added, we may want to create a new comment to make it clearer that a new action was taken, without erasing/hiding the history of the previous comment. That would make it easier to incorporate the kind of messaging Magnus is asking for.
>
> For the case of running LabelerWorkItem after executing a LabelCommand, just to collapse groups, I'm starting to think that it would be better to just have the LabelCommand automatically collapse groups for you. The implementation might be shared, but by having it happen through the LabelCommand, we don't need to worry about updating the auto label comments, or racing against bot restarts. In that case the LabelCommand reply would include a message of combining the groups.
>
> I might have missed something, but these are my current thoughts.
Make sense to me. I am thinking about should we introduce a command to let user be able to disable and enable the auto labeling, like `/autolabel off` and `/autolabel on`.
-------------
PR Comment: https://git.openjdk.org/skara/pull/1735#issuecomment-3237528161
More information about the skara-dev
mailing list