Is there a way to change the auto-generated release notes header? #192093
-
🏷️ Discussion TypeQuestion BodyIs there a way to change the "What's Changed" auto-generated release notes header, and if not, is it possible to programmatically replace it with regex before the release is published? Guidelines
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
There is no native way to change the "What's Changed" header directly. It is hardcoded by GitHub. However, you can programmatically replace it before publishing by using GitHub Actions and the A workflow example: name: Custom Release Notes
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Generate, modify and publish notes
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh api --method POST \
-H "Accept: application/vnd.github+json" \
/repos/${{ github.repository }}/releases/generate-notes \
-f tag_name="${{ github.ref_name }}" \
-q .body > notes.md
sed -i 's/## What'\''s Changed/## Release Highlights/g' notes.md
gh release create ${{ github.ref_name }} \
--title "Release ${{ github.ref_name }}" \
--notes-file notes.mdHope that helps. |
Beta Was this translation helpful? Give feedback.
-
|
You can’t change the “What’s Changed” header natively in GitHub auto-generated release notes—it’s hardcoded. Workarounds:
So yes, programmatic replacement is possible, but only outside the default UI flow |
Beta Was this translation helpful? Give feedback.
There is no native way to change the "What's Changed" header directly. It is hardcoded by GitHub.
However, you can programmatically replace it before publishing by using GitHub Actions and the
ghCLI. The standard approach is to generate the default release notes via the API, usesedfor your regex replacement, and then create the release using that modified file.A workflow example: