Skip to content

Commit 466fd0e

Browse files
author
hfla-workflow-rollout[bot]
committed
Install Add Update Label Weekly and project-specific files
1 parent 62a8275 commit 466fd0e

File tree

4 files changed

+1070
-0
lines changed

4 files changed

+1070
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Add Update Label Weekly
2+
3+
# Customization notes:
4+
# ⓵ CUSTOMIZE: Change cron. Currently runs Fri 0700 UTC, exc. July and December
5+
# ⮡ You can compose a schedule here: https://crontab.cronhub.io/
6+
# ⓶ CUSTOMIZE: Change to your project repo name
7+
# ⓷ Confirm that this is the most recent version
8+
9+
on:
10+
schedule:
11+
- cron: '0 7 * 1-6,8-11 5' #
12+
workflow_dispatch:
13+
inputs:
14+
dry-run:
15+
description: 'Run in dry-run mode without posting comments or updating issues'
16+
type: choice
17+
options:
18+
- 'true'
19+
- 'false'
20+
default: 'true'
21+
22+
jobs:
23+
Add-Update-Label-Weekly:
24+
runs-on: ubuntu-latest
25+
if: github.repository == 'your-project/repo-name' #
26+
steps:
27+
- name: Generate token from GitHub App
28+
id: generate-app-token
29+
uses: actions/create-github-app-token@v2
30+
with:
31+
app-id: ${{ secrets.HFLA_GRAPHQL_APP_ID }}
32+
private-key: ${{ secrets.HFLA_GRAPHQL_APP_PRIVATE_KEY }}
33+
34+
- name: Checkout repository
35+
uses: actions/checkout@v5
36+
37+
- name: Run workflow
38+
uses: hackforla/automate-the-org/add-update-label-weekly@v1 #
39+
with:
40+
github-token: ${{ steps.generate-app-token.outputs.token }}
41+
dry-run: ${{ github.event.inputs.dry-run || 'true' }}
Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
# Configuration for "Add Update Label Weekly" action
2+
# This 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. Except where noted: DO NOT EDIT "keys" as this may break the automation.
10+
# b. Customize the "values" below for your project's needs.
11+
# 2. The default values will apply if not edited.
12+
# 3. Text values must match the EXACT text used in your project repo.
13+
#
14+
15+
16+
17+
# ==============================================================================
18+
# Time thresholds (in days)
19+
# ==============================================================================
20+
timeframes:
21+
# Customize the number of days as needed for your project
22+
# Note: the next 3 values must be sorted min to max, recentlyUpdated < needsUpdating < isInactive
23+
recentlyUpdatedByDays: 3 # Issues updated within this many days are considered current
24+
needsUpdatingByDays: 7 # Issues not updated for this many days are prompted for update
25+
isInactiveByDays: 14 # Issues not updated for this many days are marked as inactive
26+
27+
upperLimitDays: 35 # See explanation following and "Bot configuration" below
28+
# To reduce issue clutter, this workflow includes a GraphQL mutation that iterates
29+
# through and minimizes previous bot comments. To avoid GitHub's rate limiting
30+
# on GraphQL mutations, bot comments older than the `upperLimitDays` are not
31+
# minimized. A low value results in no bot comments minimized, and a high value
32+
# results in all bot comments minimized.
33+
34+
35+
36+
# ==============================================================================
37+
# Project Board status-column configuration
38+
# ==============================================================================
39+
projectBoard:
40+
# The values in this section must match your EXACT Project Board status-column.
41+
42+
targetStatus: "In progress (actively working)" # Status-column to include.
43+
# Only issues status-column are included in the automation to check whether
44+
# assignees are updating their issues.
45+
46+
questionsStatus: "Questions / In Review" # Used with the message template.
47+
# The bot's message instructs issue assignees needing help to move their issue to
48+
# this status-column. Issues in this status-column are NOT checked by the automation.
49+
50+
51+
52+
# ==============================================================================
53+
# Label Directory Filepath- Do not change
54+
# ==============================================================================
55+
56+
# The automation reviews which labels have been applied to the included issues, to:
57+
# 1. Flag issues that need updates from the assignee, and
58+
# 2. Ignore issues that do not need to be checked.
59+
#
60+
# The workflow relies on the label "keys" to identify the purpose of each label
61+
# which correspond to the actual label name "values" used by your repo.
62+
#
63+
# NOTE: Since different workflows use many of the same label names, label name
64+
# values are mapped in your project's label directory json file- not here.
65+
# The path to your label directory is here (do not change):
66+
67+
labelDirectoryPath: "github-actions/workflow-configs/_data/label-directory.json"
68+
69+
70+
71+
# ==============================================================================
72+
# Label keys used by this workflow
73+
# ==============================================================================
74+
75+
# The label "keys" shown here are used internally by the workflow.
76+
77+
labels:
78+
required:
79+
# Required label keys: DO NOT REMOVE, confirm "values" in `label-directory.json`
80+
# The following label "keys" must be mapped to your project's actual label name
81+
# "values" via the `label-directory.json` file. The workflow uses these labels
82+
# to flag which issues need updates.
83+
- statusUpdated # Map in the `label-directory.json` file
84+
- statusInactive1 # Map in the `label-directory.json` file
85+
- statusInactive2 # Map in the `label-directory.json` file
86+
87+
# Secondary key, used by message template
88+
- statusHelpWanted # Map in the `label-directory.json` file
89+
90+
ignored:
91+
# Issues with these labels are ignored by the automation.
92+
# EXCEPTION: you may add or remove label "keys" from this list as desired- but
93+
# ensure the added "key" maps to a "value" in your label-directory.json file.
94+
- draft # Map in the `label-directory.json` file
95+
- er # Map in the `label-directory.json` file
96+
- epic # Map in the `label-directory.json` file
97+
- dependency # Map in the `label-directory.json` file
98+
- complexity0 # Map in the `label-directory.json` file
99+
100+
101+
102+
# ==============================================================================
103+
# Bot configuration- If needed
104+
# ==============================================================================
105+
# Relevant to "timeframes.upperLimitDays" setting above: Bot usernames whose
106+
# comments should be minimized when they become outdated. Comments are minimized
107+
# if they're between 'needsUpdatingByDays' and 'upperLimitDays' old
108+
bots:
109+
- "github-actions[bot]"
110+
- "HackforLABot"
111+
# Only if needed, add any additional bot usernames here
112+
113+
114+
115+
# ==============================================================================
116+
# Bot comment template
117+
# ==============================================================================
118+
# Template for the comment posted to issues needing updates
119+
# Variables used by template:
120+
# ${assignees} - @-mentions of all assignees (e.g., "@user1, @user2")
121+
# ${label} - The label being applied (e.g., "Status: To Update")
122+
# ${statusUpdated} - The "updated" label name from your label directory
123+
# ${statusHelpWanted} - The "help wanted" label name from your label directory
124+
# ${questionsStatus} - The "questions" status on your Project Board (e.g., "Questions / In Review")
125+
# ${cutoffTime} - The formatted timestamp of the issue's last update
126+
127+
teamSlackChannel: "" # Only if needed, for example "#project-site"
128+
129+
# Do not change the path to the bot comment template file below.
130+
# If needed, edit the file using markdown syntax at the given path.
131+
botCommentTemplatePath: "github-actions/workflow-configs/templates/add-update-instructions-template.md"
132+
133+
134+
135+
# ==============================================================================
136+
# Advanced options
137+
# ==============================================================================
138+
# Uncomment and configure these if needed for your project
139+
140+
# Local timezone for cutoffTime displayed in comments (default: America/Los_Angeles)
141+
# timezone: "America/New_York"
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
5. Pictures (optional): "Add any pictures of the visual changes made to the site so far."
14+
15+
If you need help, be sure to either: 1) place your issue in the "${questionsStatus}" status-column of the
16+
Project Board and ask for help at your next meeting; 2) put a `${statusHelpWanted}` label on your issue
17+
and pull request; or 3) put up a request for assistance on the team's ${teamSlackChannel} Slack channel.
18+
19+
Please note that including your questions in the issue comments- along with screenshots, if applicable-
20+
will help us to help you. [Here](https://github.com/hackforla/website/issues/1619#issuecomment-897315561) and [here](https://github.com/hackforla/website/issues/1908#issuecomment-877908152) are examples of well-formed questions.
21+
22+
<sub>You are receiving this comment because your last update was before ${cutoffTime} PST.</sub>

0 commit comments

Comments
 (0)