Closed obulat closed 6 months ago
I wrote a script today that should work with the github-script
action: https://gist.github.com/sarayourfriend/84c307277f155d84ae7aa34b3bbc8ecb
It needs to properly paginate the issues query, but I used it successfully to do a one-off fix for high priority issues that were mismatched.
This actually looks like it was completed in #3375 based on blame of this action: https://github.com/WordPress/openverse/blob/8cd1dbcf8861238bac15dcaae28b587f244a377c/automations/js/src/project_automation/issues.mjs#L12-L27
I tested this against this issue (by bumping it's priority), and indeed the script moved it to the new priority field! Here's the relevant action logs: https://github.com/WordPress/openverse/actions/runs/8382753314/job/22957133387
Background
After #1138, all issues created in Openverse repo are added to the Openverse project board, and their Priority custom field value is set based on the issue's priority label. We need to use the "custom field" to be able to group issues on the new GitHub Project views. When you update the issue priority, you currently have to do it in both places: the Project custom field, and the issue label.
Description
We need to add 2 actions:
projects_v2_item
edited
webhook ^1 - if the Priority custom field value changed, update the label.