RFR: 1715: Configure custom default security level for new backport issues in notifier

Erik Joelsson erikj at openjdk.org
Wed Jan 18 14:53:32 UTC 2023

On Wed, 18 Jan 2023 14:03:57 GMT, Magnus Ihse Bursie <ihse at openjdk.org> wrote:

>> This patch makes it possible to configure a default security level to use for any newly created backport in the IssueNotifier. The configuration is done per repository and branch, with a regex for matching branch names. This is what it would look like in the bot configuration.
>> "issue": {
>>   "project": "bugs/JDK",
>>   "fixversions": {},
>>   "buildname": "master",
>>   "headversion": true,
>>   "defaultsecurity": {  // <- new
>>     "jdk.*": "10000",
>>   }
>> }
>> If the parent bug already has a security level, then that is inherited, just like today, otherwise this new default value is used.
> bots/notify/src/main/java/org/openjdk/skara/bots/notify/issue/JbsBackport.java line 55:
>> 53:         var finalProperties = new HashMap<>(primary.properties());
>> 54:         finalProperties.put("issuetype", JSON.of("Backport"));
>> 55:         finalProperties.put("fixVersion", JSON.of(fixVersion));
> Not sure I fully understand what this does in the context of this PR.

You are right, that's not related to the actual issue, just something that I found missing in this code path. In practice, this path is only used in tests. When interacting with a real JBS instance, we have a backportRequest.


PR: https://git.openjdk.org/skara/pull/1445

More information about the skara-dev mailing list