RFR: 1084: Automatically update repository labels from Skara config
Erik Joelsson
erikj at openjdk.java.net
Tue Jul 6 21:00:16 UTC 2021
This patch adds a new WorkItem to the MailingListBridgeBot. The new LabelsUpdaterWorkItem runs once at startup and makes sure all mailing list labels configured for the repository actually exist as labels in the hosted repository (in GitHub or GitLab). I chose to implement this as a WorkItem, even though it's just run once. It will also block any other WorkItems in the bot from running until successful. By using the existing framework for this, we get automatic retries and I believe it will play better with other bots for resource usage, even though it doesn't quite fit in.
The new WorkItem also keeps the description field updated with the mailing list email address. This use of the description field was initially added manually for the main jdk repository on GitHub, but has not been kept up to date since, and has not been propagated to other repositories (jdk16 and jdk17). These description fields are both informative for the user, as well as being used by the CLI client to present information to users.
To verify the new interaction for managing labels on a repository with both GitLab and GitHub, I have implemented a new type of manual tests. They are disabled from automatic running in Gradle using the @Disabled annotation. To run them you need to provide a properties file with data about account and keys to use to access the servers. We don't want these kinds of tests to run against GitHub/GitLab automatically, but at least now there is a way to semi automatically verify that kind of functionality.
-------------
Commit messages:
- Added test and log messages
- SKARA-1084
Changes: https://git.openjdk.java.net/skara/pull/1194/files
Webrev: https://webrevs.openjdk.java.net/?repo=skara&pr=1194&range=00
Issue: https://bugs.openjdk.java.net/browse/SKARA-1084
Stats: 427 lines in 14 files changed: 420 ins; 1 del; 6 mod
Patch: https://git.openjdk.java.net/skara/pull/1194.diff
Fetch: git fetch https://git.openjdk.java.net/skara pull/1194/head:pull/1194
PR: https://git.openjdk.java.net/skara/pull/1194
More information about the skara-dev
mailing list