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

Refactoring check-labels.js to use label-directory.json #7777

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 Nov 28, 2024

Fixes #7531

What changes did you make?

  • In check-labels.js, replaced labelNames with equivalent labelKey values and call to retrieveLabelDirectory
  • Moved hard-coded values from mutate-issue-status.js and consolidated into status-field-ids.js
  • Changed variable name and corrected error message in mutate-issue-status.js

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

  • We are refactoring codebase to use the labelKey values so that the functions can be shared throughout the org
  • Having all of the hard-coded values in one location makes them easier to track.

CodeQL Alerts

After the PR has been submitted and the resulting GitHub actions/checks have been completed, developers should check the PR for CodeQL alert annotations.

Check the PR's comments. If present on your PR, the CodeQL alert looks similar as shown

Screenshot 2024-10-28 154514

Please let us know that you have checked for CodeQL alerts. Please do not dismiss alerts.

  • I have checked this PR for CodeQL alerts and none were found.
  • I found CodeQL alert(s), and (select one):
    • I have resolved the CodeQL alert(s) as noted
    • I believe the CodeQL alert(s) is a false positive (Merge Team will evaluate)
    • I have followed the Instructions below, but I am still stuck (Merge Team will evaluate)
Instructions for resolving CodeQL alerts

If CodeQL alert/annotations appear, refer to How to Resolve CodeQL alerts.

In general, CodeQL alerts should be resolved prior to PR reviews and merging

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

Notes for Reviewers

In order to review this issue, you will need to set up your environment first:

  • Refer to Hack for LA's GitHub Actions (current revision), especially Tips 6, 7, and 8, if you have not already created you personal environment for testing.
  • How to Test GitHub Actions
  • Additional Notes for GitHub Actions
  • To test the first part of this: go to "Issues" in your repo, select "New issue", and select any of the issues templates. Remove any labels that are there, and add back either no labels or one or two such as good first issue and size: 5pt, then create issue. The bot should add the Complexity: missing, role: missing, etc. as appropriate.
  • To test the second part of this, there is a little bit more work to do:
    • First, open GithHub's GraphQL Explorer. Link up to your repo if needed
    • Go to github-actions/utils/_data/status-field-ids.js and scroll down to the comments. Copy lines 47-62 in the query section, and lines 64-68 under variables. Replace with your login and the number of your project board- it is probably '1' but you can check by selecting "Projects" from your repo and seeing what number yours is.
    • Run Explorer, then substitute your values for the "projectV2" and "filed" ids, as well as the value for "Questions/ In Review", into status-field-ids.js.
    • Go to "Issues" again, select "New issue", find "Blank Issue Template" and select "Get started". Remove all the labels, then title your issue:
    The Hack for LA website bot removed me!  
    
    • Then "Submit new issue". If everything works, the issue will be labelled correctly and moved to "Status" "Questions/ In Review"

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-check-labels-7531 gh-pages
git pull https://github.com/t-will-gillis/website.git refactor-check-labels-7531

@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 Nov 28, 2024
Fix indent in comments section
@codyyjxn codyyjxn self-requested a review December 5, 2024 05:25
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 check-labels.js to use label-directory.json
1 participant