Skip to content

Add changelog generation script and tools#856

Merged
tfrauenstein merged 3 commits intomainfrom
feature/changelog-generation-tool
Mar 3, 2026
Merged

Add changelog generation script and tools#856
tfrauenstein merged 3 commits intomainfrom
feature/changelog-generation-tool

Conversation

@SmilyOrg
Copy link
Member

Summary

Introduces a production-ready changelog generation system based on the discussion in PR #816.

This PR adds the tools and infrastructure for automated changelog generation:

  • scripts/changelog.sh: Main script with smart auto-detection and multiple modes
  • scripts/changelog.prompt: AI prompt for identifying rule changes
  • Makefile target: make changelog for easy invocation

Features

  • Smart auto-detection: Reads chapters/changelog.adoc and generates entries for commits since the latest entry
  • Rule-focused: Filters out formatting, infrastructure, and editorial changes
  • Properly formatted: Maintains correct AsciiDoc formatting with rule references and PR/commit links
  • Easy to use: Single command to update the changelog

Usage

Simply run:

make changelog

This will:

  1. Auto-detect the latest changelog entry
  2. Find all rule changes since that date
  3. Update chapters/changelog.adoc in place

Advanced Options (optional)

For more control, use the script directly:

./scripts/changelog.sh --year 2025    # Generate for specific year
./scripts/changelog.sh --since 2025-06-01  # Generate since specific date  
./scripts/changelog.sh --raw          # View full AI analysis

What's Included

  • changelog.sh: Automated changelog generation script (177 lines)
  • changelog.prompt: AI prompt template with clear instructions
  • Makefile: Simple `changelog` target

Testing

The script has been tested with:

  • Auto-detection of latest changelog date
  • Generation of entries since that date
  • File update with proper formatting

Next Steps

A follow-up PR will run this tool to update `chapters/changelog.adoc` with the latest rule changes.


🤖 Generated with Claude Code

Introduces a production-ready changelog generation system based on PR #816 discussion.

Features:
- scripts/changelog.sh: Automated script to generate changelog entries from git history
- scripts/changelog.prompt: AI prompt instructions for identifying rule changes
- Makefile target: 'make changelog' auto-detects latest entry and updates in place

The tool analyzes git commits for a specified time period, identifies rule-related
changes (filtering out formatting, infrastructure, and editorial changes), and formats
them as AsciiDoc changelog entries with proper cross-references and PR/commit links.

Usage:
  Direct: ./scripts/changelog.sh [OPTIONS]
  Make:   make changelog

Options:
  --raw              Show full AI analysis output
  --update           Write entries to chapters/changelog.adoc (default for make)
  --year YYYY        Generate for entire year
  --since YYYY-MM-DD Generate since specific date

By default (no args), auto-detects latest changelog entry and generates for
commits after that date.

Requirements:
  - zllm command installed (Zalando internal tool)
  - Git repository

Co-Authored-By: Claude Code <noreply@anthropic.com>
@SmilyOrg SmilyOrg added the major Major feature changes or updates, e.g. feature rollout to a new country, new API calls. label Feb 19, 2026
@SmilyOrg SmilyOrg marked this pull request as ready for review February 19, 2026 16:50
@SmilyOrg SmilyOrg requested review from Copilot and ePaul February 19, 2026 16:50
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces an automated changelog generation system that uses AI (via the zllm command) to analyze git history and generate properly formatted AsciiDoc changelog entries for rule changes. The system is designed to streamline the maintenance of the project's changelog by automatically detecting changes that affect rules and filtering out non-substantive changes.

Changes:

  • Added scripts/changelog.sh: A 177-line bash script that provides smart auto-detection of the latest changelog entry, filters rule changes from git history, and supports multiple operating modes
  • Added scripts/changelog.prompt: An AI prompt template with instructions and examples for generating changelog entries in the correct AsciiDoc format
  • Added make changelog target: Provides easy invocation of the changelog generation with automatic file updates

Reviewed changes

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

File Description
scripts/changelog.sh Main automation script with auto-detection, multiple modes (auto/year/since), and file update capability
scripts/changelog.prompt AI prompt template defining format rules and providing examples for changelog entry generation
Makefile Adds changelog target to .PHONY list and defines target that invokes changelog.sh with --update flag

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

SmilyOrg and others added 2 commits February 20, 2026 16:23
- Fix spelling: "producedure" → "procedure" in both changelog.prompt and chapters/changelog.adoc
- Fix shebang format to match project conventions (#! /bin/bash)
- Replace non-portable grep -oP with grep -E + sed for macOS compatibility
- Add error handling for missing "== Rule Changes" header before arithmetic operations

Co-Authored-By: Claude Code <noreply@anthropic.com>
Add a new section describing the changelog generation tool, its prerequisites,
and usage options to match existing documentation practices for other Makefile targets.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@tkrop
Copy link
Member

tkrop commented Mar 3, 2026

👍

1 similar comment
@tfrauenstein
Copy link
Member

👍

@tfrauenstein tfrauenstein merged commit 075dbb1 into main Mar 3, 2026
4 checks passed
@tfrauenstein tfrauenstein deleted the feature/changelog-generation-tool branch March 3, 2026 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

major Major feature changes or updates, e.g. feature rollout to a new country, new API calls.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants