mojira / arisa-kt

:robot::sparkles: Run checks and perform automated tasks in Mojira
https://bugs.mojang.com
GNU General Public License v3.0
10 stars 6 forks source link

Revoke unauthorized changes to "Mojang Priority" field #766

Closed violine1101 closed 2 years ago

violine1101 commented 2 years ago

Purpose

When it's possible to change Mojang Priority despite not being authorized to do so, the bot should revert those changes.

Approach

Copied RevokeConfirmationModule, and changed a few things up.

The mojang priority field appears to be a bit tricky because of the "None" default that needs to be dealt with. Instead of the name of the field values, I use the IDs which is safer and also means I can revert priority back to "None".

Future work

Fix up how we interact with JIRA API, this is really janky.

Checklist

violine1101 commented 2 years ago

Works for newly created bug reports too, just tested it.