Skip to content

Commit 4ac84b6

Browse files
hfla-workflow-rollout[bot]hfla-workflow-rollout[bot]ale210
authored
Install workflow: Add Update Label Weekly - ATO (#184)
* Install Add Update Label Weekly - ATO and project-specific files * edit update message --------- Co-authored-by: hfla-workflow-rollout[bot] <hfla-workflow-rollout@hackforla.org> Co-authored-by: Alex English <alex.english80@gmail.com>
1 parent 41b98fd commit 4ac84b6

3 files changed

Lines changed: 269 additions & 0 deletions

File tree

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Add Update Label Weekly - ATO
2+
3+
# Associated configuration files for this workflow:
4+
# `github-actions/workflow-configs/add-update-label-weekly-config.yml`
5+
# `github-actions/workflow-configs/templates/add-update-instructions-template.md`
6+
# Customization notes:
7+
# Change cron as needed- currently runs Fri 0700 UTC, exc. July and December
8+
# ⮡ You can compose a schedule here: https://crontab.cronhub.io/
9+
10+
on:
11+
schedule:
12+
- cron: '0 7 * 1-6,8-11 5'
13+
workflow_dispatch:
14+
inputs:
15+
dry-run:
16+
description: 'Run in dry-run mode to preview changes: will not update labels or comments.'
17+
type: boolean
18+
default: true
19+
20+
permissions:
21+
contents: read
22+
23+
jobs:
24+
Add-Update-Label-Weekly:
25+
runs-on: ubuntu-latest
26+
if: github.repository == 'hackforla/devops-security'
27+
steps:
28+
- name: Generate token from GitHub App
29+
id: generate-app-token
30+
uses: actions/create-github-app-token@v3
31+
with:
32+
app-id: ${{ secrets.HFLA_GRAPHQL_APP_ID }}
33+
private-key: ${{ secrets.HFLA_GRAPHQL_APP_PRIVATE_KEY }}
34+
35+
- name: Checkout repository
36+
uses: actions/checkout@v6
37+
38+
- name: Run workflow
39+
uses: hackforla/automate-the-org/gha-add-update-label-weekly@v1
40+
with:
41+
github-token: ${{ steps.generate-app-token.outputs.token }}
42+
dry-run: ${{ github.event_name == 'schedule' && 'false' || github.event.inputs.dry-run || 'true' }}
Lines changed: 209 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,209 @@
1+
# "Add Update Label Weekly" workflow configuration file
2+
# File installed at: `github-actions/workflow-configs/add-update-label-weekly-config.yml`
3+
4+
# ==============================================================================
5+
# IMPORTANT NOTES
6+
# ==============================================================================
7+
#
8+
# 1. The configuration options are given as "key: value" pairs.
9+
# a. Customize the "values" below for your project's needs.
10+
# b. DO NOT EDIT "keys" as this may break the automation.
11+
# c. DO NOT CHANGE indentation, spacing, or formatting for same reason.
12+
# 2. Text values must match the EXACT text used in your project repo.
13+
# 3. The default values will apply if not edited, and the workflow will attempt
14+
# to run with those defaults. It is recommended to review and edit all values.
15+
16+
17+
18+
# ==============================================================================
19+
# Opt-in for future features
20+
# ==============================================================================
21+
#
22+
# If you would like to opt-in for future features when and if they are added to
23+
# this workflow, uncomment this field and enter 'true'. If you do not, enter
24+
# 'false' and/or keep this variable commented out.
25+
26+
# optInFutureFeatures: true
27+
28+
29+
30+
# ==============================================================================
31+
# Labels and label placeholders used by this workflow
32+
# ==============================================================================
33+
#
34+
# The `required` section lists label placeholder keys, which are identifiers
35+
# used in the workflow to reference GitHub repo labels. These placeholder label
36+
# keys are essential for the workflow to function and must be mapped to the
37+
# **actual label names** that exist in your project. Do not change the label
38+
# keys, however **do edit** the name values (in quotes) to match your project's
39+
# labels. The `required` labels are:
40+
#
41+
# statusUpdated: "label for issues considered current"
42+
# statusInactive1: "label for issues needing updates"
43+
# statusInactive2: "label for issues considered inactive"
44+
# statusHelpWanted: "label for issues where assignees need help"
45+
#
46+
# The `filtering` section lists labels that, when present on an issue, cause
47+
# the workflow to omit that issue from the update status checks. If an issue
48+
# should be excluded from the update checks (for example, a draft issue), it
49+
# can be labeled with one of the 'filtering' labels and the workflow will skip
50+
# that issue.
51+
#
52+
# The label names shown below are default values only. Each of the label names
53+
# shown **must exactly match an existing label** in your project repo, and must
54+
# be surrounded in quotes. Confirm that the default value is correct, or change
55+
# it to match your repo, then to show that you have reviewed and confirmed the
56+
# values, **delete the comment**.
57+
58+
labels:
59+
required:
60+
statusUpdated: "status: updated" # <-- confirm default label name
61+
statusInactive1: "status: to update!" # <-- confirm default label name
62+
statusInactive2: "status: 2 weeks inactive" # <-- confirm default label name
63+
statusHelpWanted: "status: help wanted" # <-- confirm default label name
64+
65+
filtering:
66+
- "draft" # <-- confirm default label name
67+
- "er" # <-- confirm default label name
68+
- "epic" # <-- confirm default label name
69+
- "dependency" # <-- confirm default label name
70+
# - "" # <-- Uncomment and add label name if needed.
71+
# - "" # <-- Uncomment and add label name if needed.
72+
73+
#
74+
# NOTE: the following is only applicable to teams that a.) use Skills Issues
75+
# and b.) **have installed the "Member Activity Trigger" workflow**.
76+
# Currently, the only team this applies to is the Website team.
77+
#
78+
# The `modifying` section defines labels that adjust how the workflow behaves
79+
# under specific conditions. For example, when the automation encounters an
80+
# issue labeled as a Skills Issue, it applies an alternate set of criteria to
81+
# determine the issue’s update status. Additionally, issues in this category
82+
# remain permanently assigned and are not subject to automatic unassignment.
83+
# This allows the workflow to adapt dynamically to different issue types while
84+
# preserving expected behavior for specialized cases.
85+
86+
87+
88+
# ==============================================================================
89+
# Time thresholds (in days)
90+
# ==============================================================================
91+
#
92+
# Each issue's update status is determined by comparing the timestamp of the
93+
# assignee's last update with the time thresholds following. These thresholds
94+
# have been assigned default values as shown below.
95+
#
96+
# ONLY IF NEEDED: You may override the default values to fit your project's needs.
97+
# Note, however, that the following values must be ordered from smallest to largest:
98+
#
99+
# recentlyUpdatedByDays: Issues updated within this many days are considered current
100+
# needsUpdatingByDays: Issues not updated for this many days are prompted for update
101+
# isInactiveByDays: Issues not updated for this many days are marked as inactive
102+
# unassignedByDays: Issues not updated for this many days have assignees removed <-- FUTURE FEATURE
103+
# upperLimitDays: Bot comments older than this not processed for minimization <-- see below
104+
105+
timeframes:
106+
recentlyUpdatedByDays: 3
107+
needsUpdatingByDays: 7
108+
isInactiveByDays: 14
109+
unassignedByDays: 21
110+
upperLimitDays: 35
111+
112+
# To reduce issue clutter and repetition, this workflow minimizes previous bot
113+
# comments via a GraphQL mutation. To limit GitHub GraphQL rate usage, only bot
114+
# comments created between `isInactiveByDays` and `upperLimitDays` ago are
115+
# processed. Adjust this value to include greater or fewer comments.
116+
#
117+
# Refer to "Bot configuration" below to set the bot username (if needed).
118+
119+
120+
121+
# ==============================================================================
122+
# Project Board status-column configuration
123+
# ==============================================================================
124+
#
125+
# The workflow only checks issues that are in the specified `targetStatus`
126+
# status-column of your Project Board. The `questionsStatus` status-column
127+
# allows assignees to opt out of checks when they need help or review.
128+
#
129+
# Values must **exactly match your Project Board status-column names**.
130+
#
131+
# targetStatus: Required for inclusion in update checks
132+
# questionsStatus: Optional; assignees may move issues here to skip checks
133+
# projectNumber: Optional; which Project Board to read the status from
134+
#
135+
# `projectNumber` matters when your issues sit on more than one Project Board. Without it the workflow
136+
# reads the status from whichever board GitHub returns first, which may not be the board this config
137+
# describes- so an issue can be skipped even though it is in the `targetStatus` column of your board.
138+
# Set it to the number in your board's URL: https://github.com/orgs/<org>/projects/<projectNumber>
139+
# Leave it commented out to keep the previous behavior.
140+
#
141+
# The status-column values shown below in "double quotes" are default values
142+
# only. Each of these values **must exactly match an existing status-column**
143+
# in your Project Board. Change each value as needed for an exact match, ensure
144+
# each value is in double quotes, then to show that you have reviewed and
145+
# confirmed the values, **delete the comment**.
146+
147+
projectBoard:
148+
targetStatus: "In progress (actively working)" # <-- confirm default value
149+
questionsStatus: "Questions / In Review" # <-- confirm default value
150+
# projectNumber: 123 # <-- uncomment and set to your board's number
151+
152+
153+
154+
155+
# ==============================================================================
156+
# Bot configuration- If needed
157+
# ==============================================================================
158+
#
159+
# Relevant to "timeframes.upperLimitDays" setting above, repetitive comments
160+
# from bots with the following usernames are processed for minimization. Only
161+
# if needed, this value can be updated to ensure bot comments are minimized.
162+
163+
bots:
164+
- "hfla-graphql-app[bot]"
165+
- "github-actions[bot]"
166+
- "HackforLABot"
167+
168+
169+
170+
# ==============================================================================
171+
# Bot comment template
172+
# ==============================================================================
173+
#
174+
# The reminder text comes from the template file installed alongside this config:
175+
# `github-actions/workflow-configs/templates/add-update-instructions-template.md`
176+
# Edit that file to change what the bot says. Ref. relevant labels, project board status-column
177+
# configuration, etc. above.
178+
#
179+
# Resolution order, highest first:
180+
# 1. `commentTemplate` set below, if you would rather keep the text inline than in its own file
181+
# 2. the template file (see `commentTemplatePath`, only needed if you move or rename it)
182+
# 3. the workflow's built-in default, used when no template file is present
183+
#
184+
# commentTemplatePath: "github-actions/workflow-configs/templates/add-update-instructions-template.md"
185+
#
186+
# commentTemplate: |
187+
# Hello ${assignees}-
188+
# ...
189+
#
190+
# Variables used by template:
191+
# ${assignees} - @-mentions of all assignees (e.g., "@user1, @user2")
192+
# ${label} - The label being applied (e.g., "Status: To Update")
193+
# ${statusUpdated} - The "updated" label name from your label directory
194+
# ${statusHelpWanted} - The "help wanted" label name from your label directory
195+
# ${questionsStatus} - The "questions" status on your Project Board (e.g., "Questions / In Review")
196+
# ${cutoffTime} - The formatted timestamp of the issue's last update
197+
198+
teamSlackChannel: "" # Only if needed, for example "#project-site"
199+
200+
201+
202+
# ==============================================================================
203+
# Advanced options
204+
# ==============================================================================
205+
#
206+
# Local timezone for cutoffTime displayed in comments. (default: America/Los_Angeles)
207+
# Uncomment and configure only if a different timezone is needed.
208+
#
209+
# timezone: "America/Los_Angeles"
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!-- Message template used with the "Add Update Label Weekly" workflow -->
2+
<!-- This file to be installed at: `github-actions/workflow-configs/templates/add-update-instructions-template.md` -->
3+
4+
Hello ${assignees}-
5+
6+
Please add an update using the below template (even if you have a pull request). Afterwards, remove
7+
the `${label}` label and add the `${statusUpdated}` label.
8+
9+
1. Progress: What is the current status of this issue? What have you completed and what is left to do?
10+
2. Blockers: Explain any difficulties or errors encountered.
11+
3. Availability: How much time will you have this week to work on this issue?
12+
4. ETA: When do you expect this issue to be completed?
13+
14+
If you need help, be sure to either: 1) place your issue in the "${questionsStatus}" status-column of the
15+
Project Board and ask for help at your next meeting; 2) put a `${statusHelpWanted}` label on your issue
16+
and pull request; or 3) put up a request for assistance on the team's ${teamSlackChannel} Slack channel.
17+
18+
<sub>You are receiving this comment because your last update was before ${cutoffTime}.</sub>

0 commit comments

Comments
 (0)