Tailoring GitHub Release Notes: Enhancing Your Software Development Overview

Automated customization of GitHub release notes.
Automated customization of GitHub release notes.

Beyond "What's Changed": Customizing GitHub Release Notes

For many development teams, GitHub's auto-generated release notes are a convenient starting point. However, the rigid structure, particularly the hardcoded "What's Changed" header, can limit how effectively teams communicate updates and provide a comprehensive software development overview. This rigidity often leads developers to seek more control over their release documentation.

The Quest for Custom Headers

A recent discussion on the GitHub Community forum, initiated by AlinaWan, highlighted this very challenge. AlinaWan asked if there was a native way to modify the "What's Changed" header or if programmatic replacement was possible before a release is published. This question resonates with anyone striving for consistent branding and a tailored software development overview in their release communications.

The Hardcoded Reality and Programmatic Solution

As confirmed by community members PenSul and Mangeshthale, GitHub's "What's Changed" header in auto-generated release notes is indeed hardcoded. This means there's no native UI option to change it directly. However, the good news is that programmatic replacement is not only possible but also a robust solution, primarily leveraging GitHub Actions and the gh CLI.

This approach allows teams to integrate custom logic into their CI/CD pipelines, giving them granular control over the release note content. It's an excellent example of how developers can enhance their git repo analytics and release processes through automation.

Automating Release Note Customization with GitHub Actions

PenSul provided an excellent workflow example demonstrating how to achieve this customization. The process involves three key steps:

  1. Generate Default Notes: Use the GitHub API via the gh api command to generate the default release notes for a given tag.
  2. Modify Content: Employ a tool like sed (a stream editor) to perform a regex-based replacement on the generated notes file. This is where you swap "## What's Changed" with your desired header, like "## Release Highlights".
  3. Create Release: Finally, use the gh release create command, passing your modified notes file, to publish the release with the custom header.

This automated flow ensures that every release provides a consistent and branded software development overview without manual intervention.

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.md

Key Takeaways for Enhanced Releases

  • No Native UI Option: GitHub's auto-generated release note headers are hardcoded.
  • Programmatic Power: GitHub Actions combined with the gh CLI offers a powerful workaround for customization.
  • Improved Communication: By tailoring release notes, teams can provide a clearer, more branded software development overview to their users and stakeholders.

This community insight demonstrates that while GitHub provides robust default features, the platform's extensibility through APIs and actions empowers developers to customize workflows to their exact needs, leading to better communication and a more polished release process.

Workflow for generating, modifying, and publishing release notes.
Workflow for generating, modifying, and publishing release notes.

Track, Analyze and Optimize Your Software DeveEx!

Effortlessly implement gamification, pre-generated performance reviews and retrospective, work quality analytics, alerts on top of your code repository activity

 Install GitHub App to Start
devActivity Screenshot