hackforla / website

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

Create new Wiki for GHA `update-label-directory.yml` #6968

Open t-will-gillis opened 1 month ago

t-will-gillis commented 1 month ago

Overview

Our Wiki pages need to have accurate and complete information to explain the GitHub Actions that the website uses. Therefore, we need to correct erroneous info and provide new documentation for the "Create Label Directory" workflow.

Action Items

Resources/Instructions

github-actions[bot] commented 1 month ago

Hi @t-will-gillis, we notice that you are assigned to an issue that you authored. Please remember to add the Draft label to this issue while you are working on it.

t-will-gillis commented 1 month ago

Update Label Directory
Workflow

Summary

The update-label-directory.yml workflow documents and manages the use of labels in the hackforla/website repository ('Repo labels') and ensures that the label-directory.json file ('JSON labels') and the Google Sheets 'Source of Truth' ('SOT labels') are kept in sync whenever a label is created, edited, or deleted in the hackforla/website repository. Specific details and functionalities are described below.

Trigger

Labels Used by Workflow

Tokens Used by Workflow

Workflow Files

Support File Folders

Background

This workflow and the supporting functions and documents surrounding it were created for these reasons:

  1. The Repo Labels:
    • The labels used for issue-making, Project Board tracking, etc. for the hackforla/website repository are maintained in the repo itself and are referred to as the "Repo Labels". The "Repo Labels" are the current, actual labels that the repo 'knows about'.
    • Prior to the "Update Label Directory" workflow, our codebase often referenced label names (labelName): for example, workflows such as "Schedule Friday 0700" include functionality to add or remove specific labels from issues, and the new issue templates specify preliminary labels to attach when an issue is created. If we need to make an edit to the labelName in the "Repo Labels", then we would also need to search for and ensure that we edit the labelName in each place it occurs, otherwise the workflow may have crashed or we may not have had the correct default labels applied to new issues.
    • To avoid this situation we decided to create a JSON file of key:value pairs so that our workflows, new issue templates, and all other code could reference a labelKey rather than a labelName. With the JSON, we could change the labelName is many times as we wanted and not worry about changing the codebase, as long as the JSON file kept track.
  2. The JSON Labels:
    • This workflow updates and uses a label-directory.json file, aka the "JSON Labels". The "JSON Labels" match labelKeys with labelNames, allowing the codebase to refer to a labelKey rather than a labelName. Accessory functions ensure that the labelKeys and the labelNames are coordinated.
    • When another workflow or template refers to a labelKey, the retrieve-label-directory.js utility retrieves the up-to-date labelName.
  3. The SOT Labels: << Check link!
    • This workflow also sends data to a Google Apps Script, which in turn updates a Google Sheets worksheet named "Source of Truth Labels" Directory.

TO BE CONTINUED

Process

TO BE CONTINUED

Test Procedure

Testing Resources

github-actions[bot] commented 1 week ago

@t-will-gillis

Please add update using the below template (even if you have a pull request). Afterwards, remove the '2 weeks inactive' label and add the 'Status: Updated' label.

  1. Progress: "What is the current status of your project? What have you completed and what is left to do?"
  2. Blockers: "Difficulties or errors encountered."
  3. Availability: "How much time will you have this week to work on this issue?"
  4. ETA: "When do you expect this issue to be completed?"
  5. Pictures (optional): "Add any pictures of the visual changes made to the site so far."

If you need help, be sure to either: 1) place your issue in the Questions/In Review column of the Project Board and ask for help at your next meeting, 2) put a "Status: Help Wanted" label on your issue and pull request, or 3) put up a request for assistance on the #hfla-site channel. Please note that including your questions in the issue comments- along with screenshots, if applicable- will help us to help you. Here and here are examples of well-formed questions.

You are receiving this comment because your last comment was before Tuesday, June 25, 2024 at 12:06 AM PST.

github-actions[bot] commented 3 days ago

@t-will-gillis

Please add update using the below template (even if you have a pull request). Afterwards, remove the '2 weeks inactive' label and add the 'Status: Updated' label.

  1. Progress: "What is the current status of your project? What have you completed and what is left to do?"
  2. Blockers: "Difficulties or errors encountered."
  3. Availability: "How much time will you have this week to work on this issue?"
  4. ETA: "When do you expect this issue to be completed?"
  5. Pictures (optional): "Add any pictures of the visual changes made to the site so far."

If you need help, be sure to either: 1) place your issue in the Questions/In Review column of the Project Board and ask for help at your next meeting, 2) put a "Status: Help Wanted" label on your issue and pull request, or 3) put up a request for assistance on the #hfla-site channel. Please note that including your questions in the issue comments- along with screenshots, if applicable- will help us to help you. Here and here are examples of well-formed questions.

You are receiving this comment because your last comment was before Tuesday, July 2, 2024 at 12:06 AM PST.

t-will-gillis commented 3 days ago

In progress, pending PR #6442