Skip to content

Improve changelog agent: prerelease support, formatting fixes, publish trigger - #641

Merged
SteveSandersonMS merged 1 commit into
mainfrom
changelog-improvements-v2
Mar 3, 2026
Merged

SteveSandersonMS merged 1 commit into
mainfrom
changelog-improvements-v2

Conversation

@SteveSandersonMS

Copy link
Copy Markdown
Contributor

Follow-up improvements to the release changelog agent:

Prerelease support

  • Agent now handles both stable and prerelease releases
  • Stable releases: update GitHub Release notes AND open a PR to update CHANGELOG.md
  • Prerelease releases: update GitHub Release notes ONLY (no CHANGELOG.md changes)

Formatting fixes (from test run feedback)

  • Don't include version heading in GitHub Release notes (redundant with release title)
  • Omit ### Other changes subheading when there are no highlighted features above it
  • Add ### New contributors section listing first-time contributors with their PR link

Trigger fix

  • Publish workflow now explicitly triggers the changelog agent via workflow_dispatch for both latest and prerelease (replaces release: published trigger which doesn't fire from GITHUB_TOKEN events)

Supersedes #640.

@SteveSandersonMS
SteveSandersonMS requested a review from a team as a code owner March 3, 2026 17:29
Copilot AI review requested due to automatic review settings March 3, 2026 17:29
@SteveSandersonMS
SteveSandersonMS force-pushed the changelog-improvements-v2 branch from d454b74 to 1f47e97 Compare March 3, 2026 17:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves the GitHub Agentic Workflow that generates release changelogs/release notes, extending it to handle prereleases and fixing formatting/triggering so it can be reliably invoked from the publish workflow.

Changes:

  • Switch release-changelog workflow to workflow_dispatch-only and update the agent prompt for stable vs prerelease behavior.
  • Update compiled release-changelog.lock.yml accordingly (inputs wiring, removal of release: published and pre-activation gating).
  • Trigger the changelog workflow from publish.yml after creating a GitHub Release/Pre-Release.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/release-changelog.md Updates agent instructions for prerelease handling and formatting tweaks; switches to workflow_dispatch input.
.github/workflows/release-changelog.lock.yml Regenerated lock workflow to match the updated .md definition and new dispatch-only trigger model.
.github/workflows/publish.yml Adds a step to dispatch the changelog workflow after release creation.

Comment on lines +216 to +219
- name: Trigger changelog generation
run: gh workflow run release-changelog.lock.yml -f tag="v${{ needs.version.outputs.version }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Copilot AI Mar 3, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gh workflow run uses the Actions/Workflow Dispatch API and typically requires the token to have actions: write permission. This workflow only grants contents: write and id-token: write, so this step is likely to fail with a 403. Add actions: write to the workflow/job permissions (or use a PAT with sufficient scope) so the dispatch succeeds.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed — added actions: write to publish.yml permissions.

Comment thread .github/workflows/release-changelog.md Outdated
Comment on lines 2 to 4
description: Generates a changelog from merged PRs/commits when a release is published, and updates the GitHub Release notes. For stable releases, also opens a PR to update CHANGELOG.md.
on:
release:
types: [published]
workflow_dispatch:

Copilot AI Mar 3, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow is now invoked only via workflow_dispatch, but the description still says it runs "when a release is published". This is misleading in the Actions UI; consider updating the description to reflect that it’s triggered via workflow_dispatch (and/or by the publish workflow) rather than a release event.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed — updated description to reflect it's triggered via workflow_dispatch / the publish workflow.

…h trigger

- Support prerelease releases: update GitHub Release notes only (no CHANGELOG.md or PR)
- Stable releases: update both CHANGELOG.md (via PR) and GitHub Release notes
- Don't include version heading in GitHub Release notes (redundant with release title)
- Omit 'Other changes' subheading when there are no highlighted features
- Add 'New contributors' section for first-time contributors
- Trigger changelog workflow from publish.yml for both latest and prerelease
- Remove release:published trigger (GITHUB_TOKEN events don't trigger other workflows)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@SteveSandersonMS
SteveSandersonMS force-pushed the changelog-improvements-v2 branch from 1f47e97 to 9f07aab Compare March 3, 2026 17:33
@SteveSandersonMS
SteveSandersonMS merged commit 51baa25 into main Mar 3, 2026
9 checks passed
@SteveSandersonMS
SteveSandersonMS deleted the changelog-improvements-v2 branch March 3, 2026 17:34
edburns pushed a commit that referenced this pull request Aug 4, 2026
…h trigger (#641)

- Support prerelease releases: update GitHub Release notes only (no CHANGELOG.md or PR)
- Stable releases: update both CHANGELOG.md (via PR) and GitHub Release notes
- Don't include version heading in GitHub Release notes (redundant with release title)
- Omit 'Other changes' subheading when there are no highlighted features
- Add 'New contributors' section for first-time contributors
- Trigger changelog workflow from publish.yml for both latest and prerelease
- Remove release:published trigger (GITHUB_TOKEN events don't trigger other workflows)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants