-
-
Notifications
You must be signed in to change notification settings - Fork 777
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
#7530
Comments
This comment has been minimized.
This comment has been minimized.
This comment was marked as outdated.
This comment was marked as outdated.
This comment has been minimized.
This comment has been minimized.
i. Availability: 9 AM - 5 PM Monday-Friday |
Please add update using the below template (even if you have a pull request). Afterwards, remove the 'To Update !' label and add the 'Status: Updated' label.
If you need help, be sure to either: 1) place your issue in the You are receiving this comment because your last comment was before Monday, November 4, 2024 at 11:04 PM PST. |
Hi @aadilahmed Please let me know if you have any questions about this or run into any problems when testing. |
I unfortunately haven't had time to work on this issue yet, but I will make sure to finish this week. Thanks for the help. |
|
Hi @t-will-gillis , My process for testing this GHA is to add a new issue to my personal project board, add a label to the issue, then close it. This process results in the error above. The issue does not move to the expected column after being closed. The only code I've modified so far is to replace the "HACKFORLA_GRAPHQL_TOKEN" and "TEAMS" tokens in move-closed-issues.yaml and issue-trigger.yml with my own secrets. Any help would be appreciated. |
Hi @aadilahmed The error is happening because mutate-item-status.js has values from Hack for LA's project and you will need to replace these with the values from your project/repo. To find these you can go to Explorer and substitute in:
and:
(I pulled the values from your repo) You likely will need to replace the values for "Done" and "QA" in status-field-ids.js also based on the results from Explorer since these are used by the "Move Closed Issues" workflow. This info should have been on the issue so I apologize. Hopefully you were not spinning your wheels for too long on this - and definitely let me know if you run into any other problems. |
Thanks, that solved my issue! |
Comments that reference specific label name:
No other uses of labelNames throughout comments. |
Hi @aadilahmed regarding the "Action Item":
This is in reference to any comments in I edited the "Action Item" to be clearer, and will remove the Thanks! |
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 the "Move Closed Issues" 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 sort-closed-issues.js.
A preliminary search found that this file uses the following labels. As you work through this issue, confirm that this list is correct, and note any additions or subtractions as needed:
Feature: Refactor CSS
Feature: Refactor HTML
Feature: Refactor JS / Liquid
Feature: Refactor GHA
role: back end/devOps
Feature: Analytics
role: front end
Add to
// Import modules
:Before the current definition of the
hard labels
around line 13, add comment:then for each label, consult label-directory.json and replace labelName with the labelKey:
Search
sort-closed-issues.js
for instances of the original label name and substitute the defined above.Prior to submitting the PR, search
sort-closed-issues.js
for for all code comments that reference a specific label nameready for product
and change status to "Questions / In Review"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
The text was updated successfully, but these errors were encountered: