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 add-label.js to use label-directory.json #7538

Open
wants to merge 5 commits into
base: gh-pages
Choose a base branch
from

Conversation

t-will-gillis
Copy link
Member

@t-will-gillis t-will-gillis commented Sep 29, 2024

Fixes #7537

What changes did you make?

  • Added link to retrieve-label-directory module and new variable definitions to use labelId - Consolidating to .map(retrieve-label-directory)
  • Searched code for comments that reference the specific label names and replaced with more generic labels
  • Removed redundant console.log() statements
  • Refactored the retrieve-label-directory.js module to remove the for loop since the labels are iterated using the spread syntax. Also, reformatted so that labelData is generated with the first iteration only.

Why did you make the changes (we will use this info to test)?

  • Edits so that the label directory is used instead of label names

Screenshots of Proposed Changes To The Website (if any, please do not include screenshots of code changes)

Notes for Testing

  • If you have not set up your local repo for testing, refer to Hack for LA's GitHub Actions (current revision), especially Tips 6, 7, and 8. Note! These tips were created for the previous GitHub Projects (classic) and are being updated for the new Projects Beta. Some additional notes:
    • When copying the Project Board, be sure to set yourself as the owner. You can rename the copy to "Project Board" or leave it.

    • After you make the copy, you will see an error message that says something to the effect that some workflows have failed to be created- you can safely ignore this message.

    • You will likely want to change the View to 'Board' to see that the status column names transferred correctly.

    • To match Hack for LA's Project Board's functionality, you may need to activate workflows by selecting the three dots in the upper right, then "Workflows". Set the "Workflows" as follows:

      Screenshot 2024-10-02 143752
    • You will want to create the labels in your repo as explained in Tip 8.

  • Create a testing branch in your repo.
  • In add-label.js, Please comment out Line 182 minimizeComments(commentsToBeMinimized);
  • There are some hard-coded values that are specific to the Hack for LA repo. I don't think that this will affect you when you are testing this. However...
  • If you run across any errors that you can not figure out quickly, please send me a message. I might know what the problem is and can save you a lot of time troubleshooting.

Copy link

Want to review this pull request? Take a look at this documentation for a step by step guide!


From your project repository, check out a new branch and test the changes.

git checkout -b t-will-gillis-refactor-add-label-7537 gh-pages
git pull https://github.com/t-will-gillis/website.git refactor-add-label-7537

@github-actions github-actions bot added role: back end/devOps Tasks for back-end developers Complexity: Large Feature: Refactor GHA Refactoring GitHub actions to fit latest architectural norms size: 5pt Can be done in 19-30 hours labels Sep 29, 2024
@t-will-gillis
Copy link
Member Author

Hey @tamara-snyder and @codyyjxn Before you get too far reviewing this issue, I want to provide instructions for reviewing the PR, hopefully in the next day or two. Thanks!

@codyyjxn
Copy link
Member

codyyjxn commented Oct 1, 2024 via email

@mrodz
Copy link
Member

mrodz commented Oct 1, 2024

Hi @t-will-gillis, I hope you are well. Is it okay if I review this PR too? I can get you a review by EOD Wednesday, 10/2.

@t-will-gillis
Copy link
Member Author

Hey @mrodz Yes, definitely! Thank you

@mrodz mrodz self-requested a review October 2, 2024 22:51
@t-will-gillis
Copy link
Member Author

Hey @tamara-snyder, @codyyjxn, and @mrodz: I believe this is ready for review now. I added review notes, and I had to make some last-minute edits because I omitted some labels.

As I said in the review notes, let me know if you run into any problems that you can not figure out quickly- I might know what the problem is and could save you a lot of headaches. Thanks!

changed note to `labelKeys` from `labelIds`
Copy link
Member

@codyyjxn codyyjxn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @t-will-gillis Great Job refactoring the labels.

  • After reviewing this the way you refactored the label-directory.js it seems like that was a great approach of retrieving the label names.
  • Also the add-label.js is returning the correct labels that you added. You also map through them correctly.
  • The branch is correctly named the issue is linked.

The only thing I recommend is changing the original issue from "New issue approval" to "Working in progress"

Also thank you for the notes on reviewing the issue. It definitely helped me understand how to go about it.

Keep it up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Complexity: Large Feature: Refactor GHA Refactoring GitHub actions to fit latest architectural norms role: back end/devOps Tasks for back-end developers size: 5pt Can be done in 19-30 hours
Projects
Status: PR Needs review
Development

Successfully merging this pull request may close these issues.

Refactor GHA add-label.js to use label-directory.json
3 participants