Skip to content

Commit 2e63b0a

Browse files
hfla-workflow-rollout[bot]Central Rollout Bot
andauthored
Install Add Update Label Weekly and project-specific files (#8396)
Co-authored-by: Central Rollout Bot <[email protected]>
1 parent 5508743 commit 2e63b0a

File tree

4 files changed

+314
-0
lines changed

4 files changed

+314
-0
lines changed
Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
# Configuration for "Add Update Label Weekly" action
2+
# Copy this file to your project: `.github/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. Do not edit any "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+
22+
updatedByDays: 3 # Issues updated within this many days are considered current
23+
commentByDays: 7 # Issues not updated for this many days are prompted for update
24+
inactiveByDays: 14 # Issues not updated for this many days are marked as inactive
25+
26+
upperLimitDays: 35 # See explanation following and "Bot configuration" below
27+
# To reduce issue clutter, this workflow includes a GraphQL mutation that iterates
28+
# through and minimizes previous bot comments. To avoid GitHub's rate limiting
29+
# on GraphQL mutations, bot comments older than the `upperLimitDays` are not
30+
# minimized. A low value results in no bot comments minimized, and a high value
31+
# results in all bot comments minimized.
32+
33+
34+
35+
# ==============================================================================
36+
# Project Board status-column configuration
37+
# ==============================================================================
38+
projectBoard:
39+
# The values in this section must match your EXACT Project Board status-column.
40+
41+
targetStatus: "In progress (actively working)" # Status-column to include.
42+
# Only issues status-column are included in the automation to check whether
43+
# assignees are updating their issues.
44+
45+
questionsStatus: "Questions / In Review" # Used with the message template.
46+
# The bot's message instructs issue assignees needing help to move their issue to
47+
# this status-column. Issues in this status-column are NOT checked by the automation.
48+
49+
50+
51+
# ==============================================================================
52+
# Label Directory
53+
# ==============================================================================
54+
55+
# The automation reviews which labels have been applied to the included issues, to:
56+
# 1. Flag issues that need updates from the assignee, and
57+
# 2. Ignore issues that do not need to be checked.
58+
#
59+
# The workflow relies on the label "keys" to identify the purpose of each label
60+
# which correspond to the actual label name "values" used by your repo.
61+
#
62+
# NOTE: Since different workflows use many of the same label names, label name
63+
# values are mapped in your project's label directory yml file- not here.
64+
# The path to your label directory is:
65+
66+
labelDirectoryPath: ".github/workflow-configs/label-directory.yml" # Do not change
67+
68+
69+
70+
# ==============================================================================
71+
# Label keys used by this workflow
72+
# ==============================================================================
73+
74+
# The label "keys" shown here are used internally by the workflow.
75+
76+
labels:
77+
required:
78+
# Required label keys: DO NOT REMOVE, confirm "values" in the label-directory
79+
# The following label "keys" must be mapped to your project's actual label names
80+
# "values" via the `label-directory.yml` file. The workflow using these labels
81+
# to flag which issues need updates.
82+
- statusUpdated # Map in the `label-directory.yml` file
83+
- statusInactive1 # Map in the `label-directory.yml` file
84+
- statusInactive2 # Map in the `label-directory.yml` file
85+
86+
# Secondary key, used by message template
87+
- statusHelpWanted # Map in the `label-directory.yml` file
88+
89+
ignored:
90+
# Issues with these labels are ignored by the automation.
91+
# You may add or remove label "keys" to this list as desired- but be sure
92+
# to map the added "key: value" pair in your label-directory.yml file.
93+
- draft # Map in the `label-directory.yml` file
94+
- er # Map in the `label-directory.yml` file
95+
- epic # Map in the `label-directory.yml` file
96+
- dependency # Map in the `label-directory.yml` file
97+
- complexity0 # Map in the `label-directory.yml` file
98+
99+
100+
101+
# ==============================================================================
102+
# Bot configuration- If needed
103+
# ==============================================================================
104+
# Relevant to "timeframes.upperLimitDays" setting above.
105+
# Bot usernames whose comments should be minimized when they become outdated.
106+
# Comments are minimized if they're between 'commentByDays' and 'upperLimitDays' old
107+
bots:
108+
- "github-actions[bot]"
109+
- "HackforLABot"
110+
# Only if needed, add any additional bot usernames here
111+
112+
113+
114+
# ==============================================================================
115+
# Bot comment template
116+
# ==============================================================================
117+
# Template for the comment posted to issues needing updates
118+
# Variables used by template:
119+
# ${assignees} - @-mentions of all assignees (e.g., "@user1, @user2")
120+
# ${label} - The label being applied (e.g., "Status: To Update")
121+
# ${statusUpdated} - The "updated" label name from your label directory
122+
# ${statusHelpWanted} - The "help wanted" label name from your label directory
123+
# ${questionsStatus} - The "questions" status on your Project Board (e.g., "Questions / In Review")
124+
# ${teamSlackChannel} - The name of your team's Slack Channel
125+
# ${cutoffTime} - The formatted timestamp of the issue's last update
126+
#
127+
# You can use Markdown formatting to edit the template found at:
128+
129+
botCommentTemplatePath: ".github/workflow-configs/templates/add-update-instructions-template.md" # Do not change
130+
131+
# commentTemplate: |
132+
# Hello ${assignees}!
133+
134+
# Please add an update comment using the below template (even if you have a pull request). Afterwards, remove
135+
# the `${label}` label and add the `${statusUpdated}` label.
136+
137+
# 1. Progress: "What is the current status of your issue? What have you completed and what is left to do?"
138+
# 2. Blockers: "Explain any difficulties or errors encountered."
139+
# 3. Availability: "How much time will you have this week to work on this issue?"
140+
# 4. ETA: "When do you expect this issue to be completed?"
141+
# 5. Pictures (optional): "Add any pictures of the visual changes made to the site so far."
142+
143+
# If you need help, be sure to either: 1) place your issue in the "${questionsStatus}" status column of the
144+
# Project Board and ask for help at your next meeting; 2) put a `${statusHelpWanted}` label on your issue
145+
# and pull request; or 3) put up a request for assistance on the team's <teamSlackChannel> Slack channel.
146+
147+
# Please note that including your questions in the issue comments- along with screenshots, if applicable-
148+
# 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.
149+
150+
# <sub>You are receiving this comment because your last comment was before ${cutoffTime}.</sub>
151+
152+
# Thanks for being part of HfLA!
153+
154+
155+
156+
# ==============================================================================
157+
# Advanced options
158+
# ==============================================================================
159+
# Uncomment and configure these if needed for your project
160+
161+
# # Custom timezone for cutoffTime display in comments (default: America/Los_Angeles)
162+
# timezone: "America/New_York"
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# ==============================================================================
2+
# Label Directory
3+
# ==============================================================================
4+
#
5+
# If this file does not already exist in your repo, copy this example file
6+
# to `.github/workflow-configs/label-directory.yml`. If you have copied this
7+
# file previously, continue editing your existing `label-directory.yml` file.
8+
#
9+
# This file maps label "keys" (left) used internally by the workflow to the
10+
# actual label names "values" used in your GitHub repository (right side):
11+
#
12+
# labelKey: "Actual Label Name in GitHub"
13+
#
14+
# Do not edit the label keys. Do, however, edit the label names to match the
15+
# labels you are using in your project, especially any required labels noted
16+
# in the `add-update-label-config.yml` file.
17+
#
18+
# When you implement additional workflows in the future, continue editing this
19+
# same file for any additional labels noted in those workflows.
20+
#
21+
# ==============================================================================
22+
# How to customize this file
23+
# ==============================================================================
24+
25+
# 1. DO NOT CHANGE the label "keys" on the left side - these are used internally
26+
# by the workflow code
27+
#
28+
# 2. You can change the label name "values" on the right to match your project's
29+
# naming conventions. Make sure label names are an exact match to your repo's
30+
# labels (including capitalization and spacing).
31+
#
32+
# 3. If you add new label "keys" to your config file, add them here too
33+
#
34+
# 4. Make sure label names exist in your GitHub repository before running the workflow
35+
#
36+
# 5. If you do not edit the name values, or if you do not include this label-directory,
37+
# the automation will substitute default values.
38+
39+
40+
complexity0: "Complexity: Prework" #
41+
complexity1: "good first issue"
42+
complexity2: "Complexity: Small"
43+
complexity3: "Complexity: Medium"
44+
complexityMissing: "Complexity: Missing"
45+
dependency: "Dependency" #
46+
draft: "Draft" #
47+
epic: "epic" #
48+
er: "ER" #
49+
featureAdministrative: "Feature: Administrative"
50+
featureAgenda: "feature: agenda"
51+
featureAnalytics: "Feature: Analytics"
52+
featureFeatureBranch: "Feature: Feature Branch"
53+
featureMissing: "Feature Missing"
54+
featureOnboardingContributingMd: "Feature: Onboarding/Contributing.md"
55+
featureRefactorCss: "Feature: Refactor CSS"
56+
featureRefactorGha: "Feature: Refactor GHA"
57+
featureRefactorHtml: "Feature: Refactor HTML"
58+
featureRefactorJsLiquid: "Feature: Refactor JS / Liquid"
59+
readyForDevLead: "ready for dev lead"
60+
readyForPrioritization: "Ready for Prioritization"
61+
roleBackEndDevOps: "role: back end/devOps"
62+
roleDesign: "role: design"
63+
roleDevLeads: "role: dev leads"
64+
roleFrontEnd: "role: front end"
65+
roleMissing: "role missing"
66+
roleUserResearch: "role: user research"
67+
size025pt: "size: 0.25pt"
68+
size05pt: "size: 0.5pt"
69+
sizeMissing: "size: missing"
70+
statusUpdated: "Status: Updated" #
71+
statusInactive1: "To Update !" #
72+
statusInactive2: "2 weeks inactive" #
73+
statusHelpWanted: "Status: Help Wanted" #
74+
skillsIssueCompleted: "Skills Issue Completed"
75+
76+
# ==============================================================================
77+
# Workflows using these labels
78+
# ==============================================================================
79+
# - ⓵ Add Update Label Weekly
80+
# - ⓶ Issue Trigger
81+
# - ⓷ PR Trigger
82+
# - ⓸ Move Closed Issues
83+
# - ⓹ Member Activity Trigger
84+
# - ⓺ Schedule Monthly
85+
# - ⓻ Update Label Directory
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<!-- Message template used with the "Add Update Label Weekly" workflow -->
2+
<!-- Copy this file to: `.github/workflow-configs/templates/add-update-instructions-template.md` -->
3+
4+
<!-- CUSTOMIZE <teamSlackChannel>. The automation will replace the other variables during runtime -->
5+
6+
Hello ${assignees}
7+
8+
Please add an update using the below template (even if you have a pull request). Afterwards, remove
9+
the `${label}` label and add the `${statusUpdated}` label.
10+
11+
1. Progress: "What is the current status of this issue? What have you completed and what is left to do?"
12+
2. Blockers: "Explain any difficulties or errors encountered."
13+
3. Availability: "How much time will you have this week to work on this issue?"
14+
4. ETA: "When do you expect this issue to be completed?"
15+
5. Pictures (optional): "Add any pictures of the visual changes made to the site so far."
16+
17+
If you need help, be sure to either: 1) place your issue in the "${questionsStatus}" status-column of the
18+
Project Board and ask for help at your next meeting; 2) put a `${statusHelpWanted}` label on your issue
19+
and pull request; or 3) put up a request for assistance on the team's <teamSlackChannel> Slack channel.
20+
21+
Please note that including your questions in the issue comments- along with screenshots, if applicable-
22+
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.
23+
24+
Thanks for being part of HfLA!
25+
26+
<sub>You are receiving this comment because your last update was before ${cutoffTime} PST.</sub>
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@v1
30+
with:
31+
app-id: ${{ secrets.HFLA_GRAPHQL_APP_ID }}
32+
private-key: ${{ secrets.HFLA_GRAPHQL_APP_PRIVATE_KEY }}
33+
34+
- name: Checkout repo
35+
uses: actions/checkout@v5
36+
37+
- name: Run workflow
38+
uses: hackforla/automate-the-org/add-update-label-weekly@v0 #
39+
with:
40+
github-token: ${{ steps.generate-app-token.outputs.token }}
41+
dry-run: ${{ github.event.inputs.dry-run || 'true' }}

0 commit comments

Comments
 (0)