hackforla / website

Hack for LA's website
https://www.hackforla.org
GNU General Public License v2.0
325 stars 778 forks source link

Refactor GHA `post-labels-comments.js` to use `label-directory.json` #7532

Open t-will-gillis opened 1 month ago

t-will-gillis commented 1 month ago

Overview

We want to refactor the GHA workflows to reference each label by a general ID (i.e. a 'labelKey') rather than the label's name so that other HfLA project groups can use these workflows without needing to match the label names used by the Website team.

Details

Currently, the GHA workflows files that add, remove, and change labels on issues identify each label by its name (i.e. the 'labelName') directly. Instead of hard-coding each label name, we want these files to identify each label by its 'labelKey' and use the retrieve-label-directory.js module to look up the corresponding 'labelName' that is needed in order for the REST API to apply labels to issues.

Action Items

This issue involves specifically the post-labels-comments.js function of the "Issue Trigger" GitHub Action, and you must set up your environment for testing GHAs in order to work on this issue. See notes below in "Resources/ Instructions", and ask questions if you need additional help- GHAs can be tricky, and if you get stuck somewhere, someone who has worked on these before might have information that will save you a lot of time.

Refer to post-labels-comments.js.

Resources/Instructions

HackforLABot commented 1 month ago

Hi @t-will-gillis, thank you for taking up this issue! Hfla appreciates you :)

Do let fellow developers know about your:- i. Availability: (When are you available to work on the issue/answer questions other programmers might have about your issue?) ii. ETA: (When do you expect this issue to be completed?)

You're awesome!

P.S. - You may not take up another issue until this issue gets merged (or closed). Thanks again :)