Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor GHA \sort-closed-issues.js\ to use label-directory.json #1007

Closed
7 tasks
t-will-gillis opened this issue Sep 28, 2024 · 0 comments
Closed
7 tasks

Comments

@t-will-gillis
Copy link
Owner

Overview

Currently, the GHA workflow 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 a general ID (i.e. 'labelId') so that different HfLA project groups will be able to use the GHA workflows without needing to match the label names used by the Website team.

Action Items

This issue involves GitHub Actions, 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.

  • Before making any of the edits following, first create a test branch in your repo and demonstrate the current, correct behavior of the GHA. Afterwards, create an additional branch for the edits following- this is the branch that will be attached to the PR.

Refer to sort-closed-issues.js. A preliminary search found that this file uses the labels: Feature: Refactor CSS,Feature: Refactor HTML,Feature: Refactor JS / Liquid,Feature: Refactor GHA,role: back end/devOps,Feature: Analytics,role: front end.

  • As you work through this issue, confirm that this list is correct, and if not note any additions or subtractions.
  • Add to // Import modules:
    const retrieveLabelDirectory = require('../../utils/retrieve-label-directory');
    
  • Add comment:
    // Use labelIds to retrieve current labelNames from directory
    
    then for each label:
    const <labelId> = retrieveLabelDirectory('<labelId>');
    
  • Search the code for instances of the original label name and substitute the defined above.
  • Search for all code comments referencing a specific label name and replace with a generalized description.
  • Perform a test in your own repo that demonstrates that there is no change to the GHA's functionality after making the edits.

Resources/Instructions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: QA
Development

No branches or pull requests

1 participant