Skip to content

Commit fa5f876

Browse files
lostindarkCopilot
andcommitted
fix: improve release highlights workflow
- Use quiet polling loop instead of verbose gh run watch - Compare against last published release, not previous tag - Prioritize commits over PRs for change detection - Stop agent immediately after calling save_highlights Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 0903231 commit fa5f876

File tree

2 files changed

+20
-8
lines changed

2 files changed

+20
-8
lines changed

.github/workflows/release-highlights.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ Generate an engaging release highlights summary for **${{ github.repository }}**
5050

5151
Use the GitHub MCP tools to fetch release information for `${{ github.repository }}`:
5252

53-
1. **Get the list of releases** — List releases and find the tag `${{ inputs.version }}`.
53+
1. **Find the previous published release** — List releases for the repository. Find the most recent release that is **not a draft** and is **published** (i.e., has a `published_at` date). This is the baseline to compare against. Note its tag name.
5454

55-
2. **Find the previous published release**From the releases list, find the most recent non-draft, published release before `${{ inputs.version }}`. Note its tag name.
55+
2. **Get all commits between releases**Use `list_commits` or `git log <prev_tag>..${{ inputs.version }} --oneline` via shell to get all commits between the previous published release tag and `${{ inputs.version }}`.
5656

57-
3. **Get commits between releases**Compare the previous release tag with `${{ inputs.version }}` to get the list of commits.
57+
3. **Optionally get merged PRs**Search for merged pull requests if needed for additional context, but rely primarily on commits since not all changes go through PRs. Use the default branch (`master`), not `main`.
5858

59-
4. **Get merged PRs** — Search for merged pull requests in the repository between the two releases.
59+
**IMPORTANT**: Compare against the last **published** release (e.g., v0.12.152), NOT the immediately previous tag. Many tags may be CI/infrastructure-only.
6060

6161
### 2. Categorize & Prioritize
6262

@@ -112,7 +112,7 @@ Dependency updates and internal improvements to keep things running smoothly.
112112

113113
### 5. Save Highlights
114114

115-
**CRITICAL**: You MUST call the `save_highlights` tool to save the generated highlights.
115+
**CRITICAL**: You MUST call the `save_highlights` tool to save the generated highlights. After calling it successfully, **STOP immediately**. Do not investigate the workflow internals or try to verify how the tool works.
116116

117117
**✅ CORRECT - Call the tool directly:**
118118
```
@@ -121,10 +121,13 @@ safeoutputs/save_highlights(
121121
)
122122
```
123123

124+
After calling `save_highlights`, your job is done. Stop.
125+
124126
**❌ INCORRECT - DO NOT:**
127+
- Investigate how safe outputs work internally
125128
- Write JSON files manually
126129
- Use bash to simulate tool calls
127-
- Create scripts that write to outputs
130+
- Explore the workflow's lock.yml or CJS files
128131

129132
**Important**: If no action is needed after completing your analysis, you **MUST** call the `noop` safe-output tool:
130133
```

.github/workflows/release.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,17 @@ jobs:
8585
if (-not $run) { throw "Could not find release highlights run" }
8686
8787
Write-Host "Waiting for release highlights run $($run.databaseId)..."
88-
gh run watch $run.databaseId --exit-status
89-
Write-Host "Release highlights completed"
88+
do {
89+
Start-Sleep -Seconds 30
90+
$status = (gh run view $run.databaseId --json status,conclusion | ConvertFrom-Json)
91+
Write-Host " Status: $($status.status)"
92+
} while ($status.status -ne "completed")
93+
94+
if ($status.conclusion -ne "success") {
95+
Write-Host "Release highlights finished with conclusion: $($status.conclusion)"
96+
} else {
97+
Write-Host "Release highlights completed successfully"
98+
}
9099
91100
# Download the artifact
92101
gh run download $run.databaseId -n release-highlights -D highlights-output

0 commit comments

Comments
 (0)