Skip to content

Commit e39a110

Browse files
docs: refresh docs-writer PR state guidance (#690)
Agent-Logs-Url: https://github.com/githubnext/ado-aw/sessions/325a8624-8532-4752-80ae-e1e423ce7929 Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
1 parent 1dbb21e commit e39a110

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

.github/workflows/docs-writer.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ cat /tmp/gh-aw/cache-memory/docs-writer-state.json 2>/dev/null || echo '{"histor
5050
Track:
5151
- last area touched
5252
- last PR title
53+
- last PR number
5354
- whether the last PR is still open
5455

5556
Recommended state shape:
@@ -62,13 +63,19 @@ Recommended state shape:
6263
"area": "markdown",
6364
"summary": "clarified trigger docs in site/src/content/docs/reference/engine.mdx",
6465
"pr_title": "docs(site): clarify MCP setup examples",
66+
"pr_number": 123,
6567
"pr_open": false
6668
}
6769
]
6870
}
6971
```
7072

71-
If the last docs-writer PR is still open, stop and emit `noop` with a short waiting message.
73+
Before acting on `pr_open`, refresh it against GitHub:
74+
- If the latest history entry has `pr_open: true`, look up the PR in GitHub.
75+
- Prefer the stored `pr_number`; only fall back to searching by `pr_title` if no number was saved yet.
76+
- If the PR is now `MERGED` or `CLOSED`, update that history entry to `pr_open: false`, keep `pr_number` if known, and write the refreshed state back to `/tmp/gh-aw/cache-memory/docs-writer-state.json` before continuing.
77+
78+
Only if the PR is still actually open should you stop and emit `noop` with a short waiting message.
7279

7380
## Step 2 — Discover High-Value Opportunities
7481

@@ -135,6 +142,8 @@ Write/update `/tmp/gh-aw/cache-memory/docs-writer-state.json` with:
135142
- summary of the change
136143
- area touched (`markdown`, `component`, or `mixed`)
137144
- PR title (if opened)
145+
- PR number (if opened)
146+
- `pr_open` reflecting the PR's current GitHub state at the time you save
138147

139148
Keep only the latest 30 entries.
140149

0 commit comments

Comments
 (0)