RFR: 1084: Automatically update repository labels from Skara config

Kevin Rushforth kcr at openjdk.java.net
Wed Jul 7 15:15:45 UTC 2021

On Wed, 7 Jul 2021 12:30:17 GMT, Erik Joelsson <erikj at openjdk.org> wrote:

>> bots/mlbridge/src/main/java/org/openjdk/skara/bots/mlbridge/ArchiveWorkItem.java line 65:
>>> 63:     public boolean concurrentWith(WorkItem other) {
>>> 64:         if (!(other instanceof ArchiveWorkItem otherArchiveItem)) {
>>> 65:             if (!(other instanceof LabelsUpdaterWorkItem otherLabelsUpdaterItem)) {
>> Pattern-matching `instanceof` was finalized in JDK 16. Has Skara already bumped its minimum JDK to 16?
> We are running the Skara bots on JDK 16, but officially we are still listing JDK 14 as minimum. I don't think it's worth bumping the minimum for this.

In that case, you will need to use explicit casts here rather than the pattern-matching `instanceof`.

>> forge/src/main/java/org/openjdk/skara/forge/github/GitHubRepository.java line 591:
>>> 589:                 .put("name", label.name())
>>> 590:                 // Color is Gray and matches all current labels
>>> 591:                 .put("color", "ededed");
>> Will this overwrite the existing color scheme? For a new repo, will it always use gray for all labels?
> If addLabel() is called on an existing label, then I think the color scheme will be overwritten. The intention not to change any label, just to add the ones that are missing. The updateLabel method will not change the color.
> Note that the labels we are adding with this patch are just the ones for mailing lists. Do you think we need to add automation for colors for the other set of labels we use (e.g. rfr, ready, csr etc)?

I think if we do add automation for colors for the other set of labels, that could be done as a follow-on fix (not sure it's needed though). I mainly wanted to make sure we wouldn't overwrite the ones for rfr, ready, etc. with gray.


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

More information about the skara-dev mailing list