Skip to content

Commit f5b68b7

Browse files
github-actions[bot]CopilotCopilot
authored
Add weekly-issue-summary workflow and fix link-checker.md heading case (#186)
- Add workflows/weekly-issue-summary.md: weekly issue activity report with trend charts - Add docs/weekly-issue-summary.md: documentation page - Update README.md: add entry under Research, Status & Planning Workflows - Fix docs/link-checker.md: normalize section headings to title case Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent b029668 commit f5b68b7

4 files changed

Lines changed: 228 additions & 3 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ A sample family of reusable [GitHub Agentic Workflows](https://github.github.com
2020
### Research, Status & Planning Workflows
2121

2222
- [📚 Weekly Research](docs/weekly-research.md) - Collect research updates and industry trends
23+
- [📊 Weekly Issue Summary](docs/weekly-issue-summary.md) - Weekly issue activity report with trend charts and recommendations
2324
- [👥 Daily Repo Status](docs/daily-repo-status.md) - Assess repository activity and create status reports
2425
- [👥 Daily Team Status](docs/daily-team-status.md) - Create upbeat daily team activity summaries with productivity insights
2526
- [📋 Daily Plan](docs/daily-plan.md) - Update planning issues for team coordination

docs/link-checker.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
**Workflow file:** [`.github/workflows/link-checker.md`](../.github/workflows/link-checker.md)
44

5-
## What it does
5+
## What It Does
66

77
The Link Checker is an automated agentic workflow that:
88

@@ -12,7 +12,7 @@ The Link Checker is an automated agentic workflow that:
1212
4. **Remembers unfixable links** using cache memory to avoid repeated attempts
1313
5. **Creates pull requests** with the fixed links when changes are made
1414

15-
## How it works
15+
## How It Works
1616

1717
````mermaid
1818
graph LR
@@ -66,7 +66,7 @@ The workflow maintains a persistent cache of unfixable broken links:
6666

6767
This prevents the workflow from repeatedly attempting to fix links that are permanently broken.
6868

69-
## When it runs
69+
## When It Runs
7070

7171
- **Daily on weekdays** (automatic fuzzy scheduling)
7272
- **Manually** via workflow_dispatch (automatically enabled for fuzzy schedules)

docs/weekly-issue-summary.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# 📊 Weekly Issue Summary
2+
3+
> For an overview of all available workflows, see the [main README](../README.md).
4+
5+
The [Weekly Issue Summary workflow](../workflows/weekly-issue-summary.md?plain=1) generates a comprehensive weekly report on issue activity, including trend charts, resolution time analysis, and actionable recommendations. It runs automatically every Monday, giving maintainers a clear snapshot of repository health over the past week and the past 30 days.
6+
7+
## Installation
8+
9+
Add the workflow to your repository:
10+
11+
```bash
12+
gh aw add https://github.com/githubnext/agentics/blob/main/workflows/weekly-issue-summary.md
13+
```
14+
15+
Then compile:
16+
17+
```bash
18+
gh aw compile
19+
```
20+
21+
## How It Works
22+
23+
````mermaid
24+
graph LR
25+
A[Monday Schedule] --> B[Collect Issue Data]
26+
B --> C[Generate Trend Charts]
27+
C --> D[Upload Charts]
28+
D --> E[Create Weekly Discussion]
29+
````
30+
31+
Each Monday at 3 PM UTC, the workflow:
32+
33+
1. **Collects issue data** — Queries issues opened and closed over the past 30 days, computing daily counts and resolution times
34+
2. **Generates trend charts** — Uses Python (pandas + matplotlib + seaborn) to produce two high-quality charts:
35+
- **Issue Activity Trends** — Weekly opened vs. closed counts and running open total
36+
- **Resolution Time Trends** — Average and median days-to-close over time
37+
3. **Uploads charts** — Stores charts as GitHub assets and collects their URLs
38+
4. **Creates a discussion** — Posts a `[Weekly Summary]` discussion in the **Audits** category with embedded charts, statistics, and recommendations
39+
40+
Older `[Weekly Summary]` discussions are automatically closed when a new one is created, keeping the discussions list clean.
41+
42+
## What You Get
43+
44+
Each weekly discussion includes:
45+
46+
- **Overview paragraph** comparing this week to last week
47+
- **Two embedded trend charts** showing activity and resolution patterns
48+
- **Key trends** highlighting common issue types, label distributions, and notable patterns
49+
- **Summary statistics table** with week-over-week comparisons
50+
- **Full issue list** in a collapsible section
51+
- **Recommendations** for the upcoming week
52+
53+
## Configuration
54+
55+
The workflow runs every Monday at 3 PM UTC. To change the schedule, edit the `cron` expression in the workflow frontmatter:
56+
57+
```yaml
58+
on:
59+
schedule:
60+
- cron: "0 15 * * 1" # Monday 3 PM UTC
61+
```
62+
63+
## Requirements
64+
65+
The workflow requires:
66+
67+
- A **GitHub Discussions** category named `audits` (create it in your repository's Discussions settings)
68+
- Python 3 available on the Actions runner (standard on GitHub-hosted runners)
69+
- Network access to install Python packages (`pandas`, `matplotlib`, `seaborn`)
70+
71+
## Permissions
72+
73+
The workflow uses `issues: read` permission only — it reads issue data but never modifies issues.

workflows/weekly-issue-summary.md

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
---
2+
description: Creates weekly summary of issue activity including trends, charts, and insights every Monday
3+
timeout-minutes: 20
4+
strict: true
5+
on:
6+
schedule:
7+
- cron: "0 15 * * 1" # Weekly on Mondays at 3 PM UTC
8+
workflow_dispatch:
9+
permissions:
10+
issues: read
11+
engine: copilot
12+
network:
13+
allowed:
14+
- defaults
15+
- python
16+
tools:
17+
edit:
18+
bash:
19+
- "*"
20+
github:
21+
lockdown: true
22+
toolsets:
23+
- issues
24+
safe-outputs:
25+
upload-asset:
26+
create-discussion:
27+
title-prefix: "[Weekly Summary] "
28+
category: "audits"
29+
close-older-discussions: true
30+
steps:
31+
- name: Setup Python environment
32+
run: |
33+
mkdir -p /tmp/charts /tmp/data
34+
pip install --user --quiet numpy pandas matplotlib seaborn scipy
35+
python3 -c "import pandas, matplotlib, seaborn; print('Python environment ready')"
36+
---
37+
38+
# Weekly Issue Summary
39+
40+
Create a comprehensive weekly summary of issue activity for repository ${{ github.repository }}.
41+
42+
## Step 1: Collect Issue Data
43+
44+
Use GitHub API tools to gather data for the past 30 days:
45+
46+
1. **Issue Activity Data** — Count of issues opened per day, closed per day, and running open count
47+
2. **Issue Resolution Data** — Average time to close issues, distribution of issue lifespans, breakdown by label
48+
49+
Fetch enough issues to compute weekly and daily trends over the past 30 days. Use the GitHub toolset to query issues filtered by `created` and `closed` dates.
50+
51+
## Step 2: Generate Trend Charts
52+
53+
Write Python scripts to create exactly 2 high-quality trend charts and execute them via bash.
54+
55+
### Chart 1: Issue Activity Trends
56+
57+
Save data to `/tmp/data/issue_activity.csv` with columns: `date,opened,closed,open_total`
58+
59+
Generate a multi-line chart:
60+
- Issues opened per week (bar or line)
61+
- Issues closed per week (bar or line)
62+
- Running total of open issues (secondary line)
63+
- X-axis: last 12 weeks, Y-axis: count
64+
- Save as `/tmp/charts/issue_activity_trends.png` at 300 DPI, 12×7 inches
65+
- Use seaborn whitegrid style with a professional color palette
66+
67+
### Chart 2: Issue Resolution Time Trends
68+
69+
Save data to `/tmp/data/issue_resolution.csv` with columns: `date,avg_days,median_days`
70+
71+
Generate a line chart with moving average overlay:
72+
- Average time to close (7-day moving average line)
73+
- Median time to close
74+
- Shaded variance band
75+
- X-axis: last 30 days, Y-axis: days to resolution
76+
- Save as `/tmp/charts/issue_resolution_trends.png` at 300 DPI, 12×7 inches
77+
78+
Run your Python scripts via bash and verify the charts exist before proceeding.
79+
80+
### Python Notes
81+
82+
- Use pandas for data manipulation and datetime handling
83+
- Use `matplotlib.pyplot` and `seaborn` for visualization
84+
- Apply `plt.tight_layout()` before saving
85+
- Handle sparse data gracefully (use bar charts if fewer than 7 data points)
86+
- Set `matplotlib.use('Agg')` to avoid display errors in headless environments
87+
88+
## Step 3: Upload Charts
89+
90+
Upload both chart images using the `upload-asset` safe output tool. Collect the returned URLs to embed in the discussion.
91+
92+
## Step 4: Create Weekly Discussion
93+
94+
Create a discussion with the title format: `Weekly Summary - [YYYY-MM-DD]`
95+
96+
### Formatting Guidelines
97+
98+
- Use `###` for main sections, `####` for subsections (discussion title is the h1)
99+
- Wrap long lists in `<details><summary>` collapsible sections
100+
- Keep critical information (overview, trends, statistics, recommendations) always visible
101+
- Keep optional detail (full issue lists, verbose breakdowns) in collapsible sections
102+
103+
### Discussion Structure
104+
105+
```markdown
106+
### 📊 Weekly Overview
107+
108+
[1–2 paragraphs: total issues opened and closed this week, how that compares to the previous week, key theme or pattern in the issues]
109+
110+
### 📈 Issue Activity Trends
111+
112+
#### Weekly Activity Patterns
113+
![Issue Activity Trends]({chart_1_url})
114+
115+
[2–3 sentences: describe the trend — are issues accumulating, being resolved quickly, or holding steady?]
116+
117+
#### Resolution Time Analysis
118+
![Issue Resolution Trends]({chart_2_url})
119+
120+
[2–3 sentences: how quickly are issues being resolved? improving or slowing down?]
121+
122+
### 🔑 Key Trends
123+
124+
[Bullet list of 3–5 notable patterns: common issue types, label distribution, new contributors filing issues, recurring topics, etc.]
125+
126+
### 📋 Summary Statistics
127+
128+
| Metric | This Week | Last Week | Trend |
129+
|--------|-----------|-----------|-------|
130+
| Issues Opened | X | X | ↑/↓/→ |
131+
| Issues Closed | X | X | ↑/↓/→ |
132+
| Currently Open | X | X | ↑/↓/→ |
133+
| Avg Close Time | X days | X days | ↑/↓/→ |
134+
135+
<details>
136+
<summary><b>Full Issue List (This Week)</b></summary>
137+
138+
[Numbered list of all issues opened this week with title, number, author, labels]
139+
140+
</details>
141+
142+
### 💡 Recommendations for Upcoming Week
143+
144+
[3–5 actionable suggestions: which issues to prioritize, patterns that suggest backlog growth, labels that need attention, etc.]
145+
```
146+
147+
## Step 5: Notes
148+
149+
- If fewer than 7 days of data are available, generate charts with available data and note the limited range
150+
- If no issues exist this week, still create a discussion noting the quiet week
151+
- Always create the discussion even if charts fail to generate (omit chart sections and explain)

0 commit comments

Comments
 (0)