From 39ae045bcad7db6e5bf1f89730004aea1801e29a Mon Sep 17 00:00:00 2001 From: "hfla-workflow-rollout[bot]" Date: Sat, 5 Sep 2026 21:02:03 +0000 Subject: [PATCH 1/2] Install Add Update Label Weekly - ATO and project-specific files --- .github/workflows/add-update-label-weekly.yml | 45 +++- .../add-update-label-weekly-config.yml | 209 ++++++++++++++++++ .../add-update-instructions-template.md | 24 ++ 3 files changed, 267 insertions(+), 11 deletions(-) create mode 100644 github-actions/workflow-configs/add-update-label-weekly-config.yml create mode 100644 github-actions/workflow-configs/templates/add-update-instructions-template.md diff --git a/.github/workflows/add-update-label-weekly.yml b/.github/workflows/add-update-label-weekly.yml index 0386e20..11dd7e7 100644 --- a/.github/workflows/add-update-label-weekly.yml +++ b/.github/workflows/add-update-label-weekly.yml @@ -1,19 +1,42 @@ -name: Schedule Sunday 0700 +name: Add Update Label Weekly - ATO + +# Associated configuration files for this workflow: +# `github-actions/workflow-configs/add-update-label-weekly-config.yml` +# `github-actions/workflow-configs/templates/add-update-instructions-template.md` +# Customization notes: +# Change cron as needed- currently runs Fri 0700 UTC, exc. July and December +# ⮡ You can compose a schedule here: https://crontab.cronhub.io/ on: schedule: - - cron: '0 7 * * 0' + - cron: '0 7 * 1-6,8-11 5' + workflow_dispatch: + inputs: + dry-run: + description: 'Run in dry-run mode to preview changes: will not update labels or comments.' + type: boolean + default: true + +permissions: + contents: read jobs: - Add-Update-Label-to-Issues-Weekly: + Add-Update-Label-Weekly: runs-on: ubuntu-latest + if: github.repository == 'hackforla/devops' steps: - - uses: actions/checkout@v4 - - uses: actions/github-script@v7 - env: - IN_PROGRESS_COLUMN_ID: ${{ secrets.IN_PROGRESS_COLUMN_ID }} + - name: Generate token from GitHub App + id: generate-app-token + uses: actions/create-github-app-token@v3 + with: + app-id: ${{ secrets.HFLA_GRAPHQL_APP_ID }} + private-key: ${{ secrets.HFLA_GRAPHQL_APP_PRIVATE_KEY }} + + - name: Checkout repository + uses: actions/checkout@v6 + + - name: Run workflow + uses: hackforla/automate-the-org/gha-add-update-label-weekly@v1 with: - script: | - const { IN_PROGRESS_COLUMN_ID } = process.env; - const script = require('./github-actions/trigger-schedule/add-update-label-weekly/add-label.js'); - script({ g: github, c: context }, IN_PROGRESS_COLUMN_ID); + github-token: ${{ steps.generate-app-token.outputs.token }} + dry-run: ${{ github.event_name == 'schedule' && 'false' || github.event.inputs.dry-run || 'true' }} diff --git a/github-actions/workflow-configs/add-update-label-weekly-config.yml b/github-actions/workflow-configs/add-update-label-weekly-config.yml new file mode 100644 index 0000000..9beccd6 --- /dev/null +++ b/github-actions/workflow-configs/add-update-label-weekly-config.yml @@ -0,0 +1,209 @@ +# "Add Update Label Weekly" workflow configuration file +# File installed at: `github-actions/workflow-configs/add-update-label-weekly-config.yml` + +# ============================================================================== +# IMPORTANT NOTES +# ============================================================================== +# +# 1. The configuration options are given as "key: value" pairs. +# a. Customize the "values" below for your project's needs. +# b. DO NOT EDIT "keys" as this may break the automation. +# c. DO NOT CHANGE indentation, spacing, or formatting for same reason. +# 2. Text values must match the EXACT text used in your project repo. +# 3. The default values will apply if not edited, and the workflow will attempt +# to run with those defaults. It is recommended to review and edit all values. + + + +# ============================================================================== +# Opt-in for future features +# ============================================================================== +# +# If you would like to opt-in for future features when and if they are added to +# this workflow, uncomment this field and enter 'true'. If you do not, enter +# 'false' and/or keep this variable commented out. + +# optInFutureFeatures: true + + + +# ============================================================================== +# Labels and label placeholders used by this workflow +# ============================================================================== +# +# The `required` section lists label placeholder keys, which are identifiers +# used in the workflow to reference GitHub repo labels. These placeholder label +# keys are essential for the workflow to function and must be mapped to the +# **actual label names** that exist in your project. Do not change the label +# keys, however **do edit** the name values (in quotes) to match your project's +# labels. The `required` labels are: +# +# statusUpdated: "label for issues considered current" +# statusInactive1: "label for issues needing updates" +# statusInactive2: "label for issues considered inactive" +# statusHelpWanted: "label for issues where assignees need help" +# +# The `filtering` section lists labels that, when present on an issue, cause +# the workflow to omit that issue from the update status checks. If an issue +# should be excluded from the update checks (for example, a draft issue), it +# can be labeled with one of the 'filtering' labels and the workflow will skip +# that issue. +# +# The label names shown below are default values only. Each of the label names +# shown **must exactly match an existing label** in your project repo, and must +# be surrounded in quotes. Confirm that the default value is correct, or change +# it to match your repo, then to show that you have reviewed and confirmed the +# values, **delete the comment**. + +labels: + required: + statusUpdated: "status: updated" # <-- confirm default label name + statusInactive1: "status: to update!" # <-- confirm default label name + statusInactive2: "status: 2 weeks inactive" # <-- confirm default label name + statusHelpWanted: "status: help wanted" # <-- confirm default label name + + filtering: + - "draft" # <-- confirm default label name + - "er" # <-- confirm default label name + - "epic" # <-- confirm default label name + - "dependency" # <-- confirm default label name + # - "" # <-- Uncomment and add label name if needed. + # - "" # <-- Uncomment and add label name if needed. + +# +# NOTE: the following is only applicable to teams that a.) use Skills Issues +# and b.) **have installed the "Member Activity Trigger" workflow**. +# Currently, the only team this applies to is the Website team. +# +# The `modifying` section defines labels that adjust how the workflow behaves +# under specific conditions. For example, when the automation encounters an +# issue labeled as a Skills Issue, it applies an alternate set of criteria to +# determine the issue’s update status. Additionally, issues in this category +# remain permanently assigned and are not subject to automatic unassignment. +# This allows the workflow to adapt dynamically to different issue types while +# preserving expected behavior for specialized cases. + + + +# ============================================================================== +# Time thresholds (in days) +# ============================================================================== +# +# Each issue's update status is determined by comparing the timestamp of the +# assignee's last update with the time thresholds following. These thresholds +# have been assigned default values as shown below. +# +# ONLY IF NEEDED: You may override the default values to fit your project's needs. +# Note, however, that the following values must be ordered from smallest to largest: +# +# recentlyUpdatedByDays: Issues updated within this many days are considered current +# needsUpdatingByDays: Issues not updated for this many days are prompted for update +# isInactiveByDays: Issues not updated for this many days are marked as inactive +# unassignedByDays: Issues not updated for this many days have assignees removed <-- FUTURE FEATURE +# upperLimitDays: Bot comments older than this not processed for minimization <-- see below + +timeframes: + recentlyUpdatedByDays: 3 + needsUpdatingByDays: 7 + isInactiveByDays: 14 + unassignedByDays: 21 + upperLimitDays: 35 + +# To reduce issue clutter and repetition, this workflow minimizes previous bot +# comments via a GraphQL mutation. To limit GitHub GraphQL rate usage, only bot +# comments created between `isInactiveByDays` and `upperLimitDays` ago are +# processed. Adjust this value to include greater or fewer comments. +# +# Refer to "Bot configuration" below to set the bot username (if needed). + + + +# ============================================================================== +# Project Board status-column configuration +# ============================================================================== +# +# The workflow only checks issues that are in the specified `targetStatus` +# status-column of your Project Board. The `questionsStatus` status-column +# allows assignees to opt out of checks when they need help or review. +# +# Values must **exactly match your Project Board status-column names**. +# +# targetStatus: Required for inclusion in update checks +# questionsStatus: Optional; assignees may move issues here to skip checks +# projectNumber: Optional; which Project Board to read the status from +# +# `projectNumber` matters when your issues sit on more than one Project Board. Without it the workflow +# reads the status from whichever board GitHub returns first, which may not be the board this config +# describes- so an issue can be skipped even though it is in the `targetStatus` column of your board. +# Set it to the number in your board's URL: https://github.com/orgs//projects/ +# Leave it commented out to keep the previous behavior. +# +# The status-column values shown below in "double quotes" are default values +# only. Each of these values **must exactly match an existing status-column** +# in your Project Board. Change each value as needed for an exact match, ensure +# each value is in double quotes, then to show that you have reviewed and +# confirmed the values, **delete the comment**. + +projectBoard: + targetStatus: "In progress (actively working)" # <-- confirm default value + questionsStatus: "Questions / In Review" # <-- confirm default value + # projectNumber: 123 # <-- uncomment and set to your board's number + + + + +# ============================================================================== +# Bot configuration- If needed +# ============================================================================== +# +# Relevant to "timeframes.upperLimitDays" setting above, repetitive comments +# from bots with the following usernames are processed for minimization. Only +# if needed, this value can be updated to ensure bot comments are minimized. + +bots: + - "hfla-graphql-app[bot]" + - "github-actions[bot]" + - "HackforLABot" + + + +# ============================================================================== +# Bot comment template +# ============================================================================== +# +# The reminder text comes from the template file installed alongside this config: +# `github-actions/workflow-configs/templates/add-update-instructions-template.md` +# Edit that file to change what the bot says. Ref. relevant labels, project board status-column +# configuration, etc. above. +# +# Resolution order, highest first: +# 1. `commentTemplate` set below, if you would rather keep the text inline than in its own file +# 2. the template file (see `commentTemplatePath`, only needed if you move or rename it) +# 3. the workflow's built-in default, used when no template file is present +# +# commentTemplatePath: "github-actions/workflow-configs/templates/add-update-instructions-template.md" +# +# commentTemplate: | +# Hello ${assignees}- +# ... +# +# Variables used by template: +# ${assignees} - @-mentions of all assignees (e.g., "@user1, @user2") +# ${label} - The label being applied (e.g., "Status: To Update") +# ${statusUpdated} - The "updated" label name from your label directory +# ${statusHelpWanted} - The "help wanted" label name from your label directory +# ${questionsStatus} - The "questions" status on your Project Board (e.g., "Questions / In Review") +# ${cutoffTime} - The formatted timestamp of the issue's last update + +teamSlackChannel: "" # Only if needed, for example "#project-site" + + + +# ============================================================================== +# Advanced options +# ============================================================================== +# +# Local timezone for cutoffTime displayed in comments. (default: America/Los_Angeles) +# Uncomment and configure only if a different timezone is needed. +# +# timezone: "America/Los_Angeles" diff --git a/github-actions/workflow-configs/templates/add-update-instructions-template.md b/github-actions/workflow-configs/templates/add-update-instructions-template.md new file mode 100644 index 0000000..b23f99a --- /dev/null +++ b/github-actions/workflow-configs/templates/add-update-instructions-template.md @@ -0,0 +1,24 @@ + + + +Hello ${assignees}- + +Please add an update using the below template (even if you have a pull request). Afterwards, remove +the `${label}` label and add the `${statusUpdated}` label. + +1. Progress: What is the current status of this issue? What have you completed and what is left to do? +2. Blockers: Explain any 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 "${questionsStatus}" status-column of the +Project Board and ask for help at your next meeting; 2) put a `${statusHelpWanted}` label on your issue +and pull request; or 3) put up a request for assistance on the team's ${teamSlackChannel} Slack channel. + +Please note that including your questions in the issue comments- along with screenshots, if applicable- +will help us to help you. Please see the following examples from the Website team of well-formed questions: +- https://github.com/hackforla/website/issues/1619#issuecomment-897315561 and +- https://github.com/hackforla/website/issues/1908#issuecomment-877908152 + +You are receiving this comment because your last update was before ${cutoffTime}. From 41ef871bc83ef839999e99daefd3d14c74dd8827 Mon Sep 17 00:00:00 2001 From: Alex English Date: Sat, 5 Sep 2026 14:16:36 -0700 Subject: [PATCH 2/2] Configure Add Update Label Weekly for this repo --- .github/workflows/add-update-label-weekly.yml | 7 +++++-- .../add-update-label-weekly-config.yml | 21 +++++++++---------- .../add-update-instructions-template.md | 7 +------ 3 files changed, 16 insertions(+), 19 deletions(-) diff --git a/.github/workflows/add-update-label-weekly.yml b/.github/workflows/add-update-label-weekly.yml index 11dd7e7..0f7f846 100644 --- a/.github/workflows/add-update-label-weekly.yml +++ b/.github/workflows/add-update-label-weekly.yml @@ -4,12 +4,15 @@ name: Add Update Label Weekly - ATO # `github-actions/workflow-configs/add-update-label-weekly-config.yml` # `github-actions/workflow-configs/templates/add-update-instructions-template.md` # Customization notes: -# Change cron as needed- currently runs Fri 0700 UTC, exc. July and December +# Runs Wed 2200 UTC, exc. July and December. +# 2200 UTC is 3:00 PM Pacific during daylight saving (PDT) and 2:00 PM Pacific outside it (PST): +# GitHub cron is always UTC and does not follow DST, so the local time shifts by an hour on +# 1 Nov 2026 and back on 8 Mar 2027. Change to '0 23' if 3:00 PM PST matters more than 3:00 PM PDT. # ⮡ You can compose a schedule here: https://crontab.cronhub.io/ on: schedule: - - cron: '0 7 * 1-6,8-11 5' + - cron: '0 22 * 1-6,8-11 3' workflow_dispatch: inputs: dry-run: diff --git a/github-actions/workflow-configs/add-update-label-weekly-config.yml b/github-actions/workflow-configs/add-update-label-weekly-config.yml index 9beccd6..2744190 100644 --- a/github-actions/workflow-configs/add-update-label-weekly-config.yml +++ b/github-actions/workflow-configs/add-update-label-weekly-config.yml @@ -57,16 +57,15 @@ labels: required: - statusUpdated: "status: updated" # <-- confirm default label name - statusInactive1: "status: to update!" # <-- confirm default label name - statusInactive2: "status: 2 weeks inactive" # <-- confirm default label name - statusHelpWanted: "status: help wanted" # <-- confirm default label name + statusUpdated: "status: updated" + statusInactive1: "status: to update!" + statusInactive2: "status: 2 weeks inactive" + statusHelpWanted: "status: help wanted" filtering: - - "draft" # <-- confirm default label name - - "er" # <-- confirm default label name - - "epic" # <-- confirm default label name - - "dependency" # <-- confirm default label name + - "draft" + - "epic" + - "dependency" # - "" # <-- Uncomment and add label name if needed. # - "" # <-- Uncomment and add label name if needed. @@ -145,9 +144,9 @@ timeframes: # confirmed the values, **delete the comment**. projectBoard: - targetStatus: "In progress (actively working)" # <-- confirm default value - questionsStatus: "Questions / In Review" # <-- confirm default value - # projectNumber: 123 # <-- uncomment and set to your board's number + targetStatus: "In progress (actively working)" + questionsStatus: "Questions/Review" + projectNumber: 73 diff --git a/github-actions/workflow-configs/templates/add-update-instructions-template.md b/github-actions/workflow-configs/templates/add-update-instructions-template.md index b23f99a..016fbce 100644 --- a/github-actions/workflow-configs/templates/add-update-instructions-template.md +++ b/github-actions/workflow-configs/templates/add-update-instructions-template.md @@ -1,7 +1,7 @@ -Hello ${assignees}- +Hello ${assignees} - Please add an update using the below template (even if you have a pull request). Afterwards, remove the `${label}` label and add the `${statusUpdated}` label. @@ -16,9 +16,4 @@ If you need help, be sure to either: 1) place your issue in the "${questionsStat Project Board and ask for help at your next meeting; 2) put a `${statusHelpWanted}` label on your issue and pull request; or 3) put up a request for assistance on the team's ${teamSlackChannel} Slack channel. -Please note that including your questions in the issue comments- along with screenshots, if applicable- -will help us to help you. Please see the following examples from the Website team of well-formed questions: -- https://github.com/hackforla/website/issues/1619#issuecomment-897315561 and -- https://github.com/hackforla/website/issues/1908#issuecomment-877908152 - You are receiving this comment because your last update was before ${cutoffTime}.