Skip to content

Automate changelog updates on PR merge#874

Merged
DannyvdSluijs merged 9 commits intomainfrom
copilot/automate-changelog-entry-update
Jan 27, 2026
Merged

Automate changelog updates on PR merge#874
DannyvdSluijs merged 9 commits intomainfrom
copilot/automate-changelog-entry-update

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 23, 2026

Manual changelog updates cause merge delays and missing entries. This PR automates the process using GitHub Actions.

Implementation

Workflow (.github/workflows/update-changelog.yml)

  • Triggers on PR merge to main
  • Maps PR labels to changelog categories (bug→Fixed, enhancement→Added, etc.)
  • Inserts entry under appropriate category in Unreleased section
  • Commits directly to main
  • Uses standalone script for better maintainability and testing

Standalone Script (bin/update-changelog.sh)

  • Extracted awk logic into a reusable bash script
  • Can be run locally for testing: ./bin/update-changelog.sh "PR Title" "123" "Fixed"
  • Includes error handling and CHANGELOG.md validation
  • Portable shebang (#!/usr/bin/env bash) for cross-platform compatibility
  • Contains built-in help text when called without arguments

Label Mapping

bug|fix          → Fixed
enhancement|feature|added → Added
changed          → Changed
deprecated       → Deprecated
removed          → Removed
security         → Security
breaking         → Changed
(default)        → Changed

Documentation (CONTRIBUTING.md)

  • Added Pull Requests section documenting the automation
  • Contributors no longer need to update CHANGELOG.md manually
  • PR title becomes the changelog entry

Technical Details

The awk script handles:

  • Inserting into existing categories (newest-first ordering)
  • Creating new categories when needed
  • Empty Unreleased sections

Entry format matches Keep a Changelog spec:

- PR title ([#123](url))

Developer Benefits

  • Easy local testing: Test changelog updates before pushing changes
  • Better maintainability: Script logic separated from workflow YAML
  • Improved debugging: Standalone script is easier to test and modify
Original prompt

This section details on the original issue you should resolve

<issue_title>Automate changelog entry once PR is merged</issue_title>
<issue_description>In order to have a up to date changelog I've been asking people to add an entry or add it myself. This is causing delays in getting PR's merged or a missing changelog entry if missed.

This should be solvable using GitHub actions e.g. https://github.com/claudiodekker/changelog-updater?tab=readme-ov-file</issue_description>

<agent_instructions>The goal is to have people create PR's without having to go back to their changes add an entry to the changelog.md with the correct PR number and put it under the correct type of change.

Create a github workflow that once merged into main it starts and adds an entry to the cahanglog in the format this repo is using.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 4 commits January 23, 2026 14:55
Co-authored-by: DannyvdSluijs <618940+DannyvdSluijs@users.noreply.github.com>
…G.md

Co-authored-by: DannyvdSluijs <618940+DannyvdSluijs@users.noreply.github.com>
Co-authored-by: DannyvdSluijs <618940+DannyvdSluijs@users.noreply.github.com>
Co-authored-by: DannyvdSluijs <618940+DannyvdSluijs@users.noreply.github.com>
Copilot AI changed the title [WIP] Automate changelog entry creation after PR merge Automate changelog updates on PR merge Jan 23, 2026
Copilot AI requested a review from DannyvdSluijs January 23, 2026 14:59
@DannyvdSluijs
Copy link
Copy Markdown
Collaborator

@copilot can you change the workflow and extract the awk scripting into a bash file in order to easier run this on a developer machine to test it etc?

Copilot AI and others added 2 commits January 27, 2026 19:12
Co-authored-by: DannyvdSluijs <618940+DannyvdSluijs@users.noreply.github.com>
Co-authored-by: DannyvdSluijs <618940+DannyvdSluijs@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jan 27, 2026

@copilot can you change the workflow and extract the awk scripting into a bash file in order to easier run this on a developer machine to test it etc?

Done! I've extracted the awk script into bin/update-changelog.sh (commit 061eb1d).

The script can now be run locally for testing:

./bin/update-changelog.sh "PR Title" "123" "Fixed"

I also added bin/README.md with comprehensive usage documentation and examples. The workflow now calls this script instead of having inline awk code.

Co-authored-by: DannyvdSluijs <618940+DannyvdSluijs@users.noreply.github.com>
Co-authored-by: DannyvdSluijs <618940+DannyvdSluijs@users.noreply.github.com>
Copilot AI requested a review from DannyvdSluijs January 27, 2026 19:30
@DannyvdSluijs DannyvdSluijs marked this pull request as ready for review January 27, 2026 19:32
@DannyvdSluijs DannyvdSluijs merged commit 6aa472d into main Jan 27, 2026
18 checks passed
@DannyvdSluijs DannyvdSluijs deleted the copilot/automate-changelog-entry-update branch January 27, 2026 19:40
github-actions bot added a commit that referenced this pull request Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Automate changelog entry once PR is merged

2 participants