WordPress / openverse

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
https://openverse.org
MIT License
239 stars 190 forks source link

Update the Priority custom field when the issue priority label changes #1163

Closed obulat closed 6 months ago

obulat commented 1 year ago

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:

sarayourfriend commented 1 year 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.

AetherUnbound commented 6 months ago

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