Skip to content

Commit 8f27541

Browse files
authored
[q] fix(weekly-blog-post-writer): dedupe Agent of the Week using published blog history (#31593)
1 parent dd8cb55 commit 8f27541

1 file changed

Lines changed: 26 additions & 7 deletions

File tree

.github/workflows/weekly-blog-post-writer.md

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,29 +113,48 @@ Prioritize by user impact and interestingness.
113113

114114
Every blog post must include an **Agent of the Week** spotlight that celebrates one of the active agentic workflows in the repository.
115115

116-
#### 5-1: Load the Featured Workflows History
116+
#### 5-1: Load Featured Workflows from Published Blog Posts (Ground Truth)
117+
118+
Use the published blog posts in `docs/src/content/docs/blog/` as the source of truth for past Agent of the Week picks. Extract previously featured workflow filenames from the "View the workflow on GitHub" links:
119+
120+
```bash
121+
grep -RhoE 'blob/main/\.github/workflows/[^[:space:]]+\.md' docs/src/content/docs/blog \
122+
| sed -E 's#^blob/main/\.github/workflows/##; s#\.md$##' \
123+
| sort -u > /tmp/gh-aw/featured-from-blog.txt
124+
125+
if [ -s /tmp/gh-aw/featured-from-blog.txt ]; then
126+
cat /tmp/gh-aw/featured-from-blog.txt
127+
else
128+
echo "(no featured workflows found in blog posts yet)"
129+
fi
130+
```
131+
132+
If this list is non-empty, treat it as authoritative for duplicate prevention.
133+
134+
#### 5-2: Load the Wiki Memory History (Fallback)
117135

118136
Read the wiki memory to find the list of workflows already featured as Agent of the Week. The wiki file is at `/tmp/gh-aw/repo-memory/wiki/agent-of-the-week.md`. If it doesn't exist yet, start fresh — every workflow is eligible.
119137

120138
```bash
121139
cat /tmp/gh-aw/repo-memory/wiki/agent-of-the-week.md 2>/dev/null || echo "(no history yet)"
122140
```
123141

124-
#### 5-2: List All Active Workflows
142+
#### 5-3: List All Active Workflows
125143

126144
Use the `agentic-workflows` MCP `list` tool to get all workflows in the repository:
127145

128146
**Tool**: `list`
129147
**Parameters**: `{}`
130148

131149
From the list, exclude:
132-
- Workflows already featured in the wiki history
150+
- Workflows already featured in published blog posts (from `/tmp/gh-aw/featured-from-blog.txt`)
151+
- Workflows already featured in the wiki history (as fallback memory)
133152
- Test workflows (names starting with `test-`)
134153
- The `weekly-blog-post-writer` itself
135154

136155
If all workflows have been featured, reset and start again from the beginning (oldest featured first).
137156

138-
#### 5-3: Query Recent Logs for the Chosen Workflow
157+
#### 5-4: Query Recent Logs for the Chosen Workflow
139158

140159
Pick the workflow that has been active most recently and **hasn't been featured yet** (or was featured longest ago). To understand what it actually does in practice, use the `agentic-workflows` MCP `logs` tool to fetch its recent run logs:
141160

@@ -155,7 +174,7 @@ Read the logs to understand:
155174
- Typical inputs and outputs
156175
- How often it runs and whether it's been busy lately
157176

158-
#### 5-4: Write the Agent of the Week Section
177+
#### 5-5: Write the Agent of the Week Section
159178

160179
Write a fun, engaging spotlight section with these elements:
161180

@@ -184,7 +203,7 @@ Write a fun, engaging spotlight section with these elements:
184203

185204
Where `{workflow-filename}` is the workflow's filename without the `.md` extension (e.g., `auto-triage-issues` for `auto-triage-issues.md`).
186205

187-
#### 5-5: Update the Wiki History
206+
#### 5-6: Update the Wiki History
188207

189208
After choosing the workflow, update the wiki file at `/tmp/gh-aw/repo-memory/wiki/agent-of-the-week.md` using the `edit` tool. Append an entry with today's date and the chosen workflow name:
190209

@@ -377,4 +396,4 @@ You have successfully completed this task when:
377396
- ✅ All version/PR/commit references link to GitHub URLs
378397
- ✅ The Agent of the Week section is present with real log-based anecdotes
379398
- ✅ A pull request has been opened with the `blog` label, OR
380-
- ✅ A `noop` call explains why no blog post was needed this week
399+
- ✅ A `noop` call explains why no blog post was needed this week

0 commit comments

Comments
 (0)