Skip to content

Conversation

graycreate
Copy link
Member

Summary

  • Improved release notes generation in the release pipeline with automatic categorization
  • Enhanced readability for both GitHub releases and Google Play Store listings
  • Cleaner commit messages without technical prefixes for end users

Changes

🚀 Release Notes Categorization

  • Automatically categorizes commits into:
    • 🚀 New Features (feat: commits)
    • 🐛 Bug Fixes (fix: commits)
    • 💪 Improvements (refactor: commits)
    • ⚡ Performance (perf: commits)
    • 🔧 Maintenance (chore: commits) - hidden by default

📝 Message Formatting

  • Removes PR numbers from commit messages (e.g., (#123))
  • Removes commit type prefixes (fix:, feat:, etc.)
  • Capitalizes first letter of each entry
  • Skips merge commits and version bump commits

🌐 Localization

  • English release notes for Google Play
  • Chinese (zh-CN) release notes with proper translations
  • Consistent formatting across GitHub and Google Play

Test Plan

The improved release notes will be generated on the next release. The categorization logic:

  1. Parses commit messages using regex patterns
  2. Groups commits by category
  3. Formats output with proper sections and emojis
  4. Maintains author attribution for GitHub releases

Example Output

Instead of:

• fix: correct parsing of consecutive sign-in days (#113)
• feat: update release pipeline to use beta track (#114)
• chore: cleanup unused imports (#116)

Now generates:

🚀 New Features:
• Update release pipeline to use beta track

🐛 Bug Fixes:
• Correct parsing of consecutive sign-in days

💪 Improvements:
• Cleanup unused imports

🤖 Generated with Claude Code

- Categorize commits into Features, Bug Fixes, Improvements, and Performance
- Clean commit messages by removing PR numbers and prefixes
- Format release notes with emojis and proper sections
- Apply same categorization to both GitHub and Google Play release notes
- Capitalize first letter of each changelog entry for better readability

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@Copilot Copilot AI review requested due to automatic review settings September 18, 2025 16:07
Copy link

@Copilot 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 enhances the release notes generation system to automatically categorize commits and improve formatting for both GitHub releases and Google Play Store listings. The changes replace simple commit listing with intelligent categorization based on conventional commit prefixes.

  • Automatic categorization of commits into logical groups (features, bug fixes, improvements, performance)
  • Enhanced message formatting with emoji icons and cleaned commit text
  • Improved localization with proper Chinese translations for Google Play

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +363 to +368
if [[ "$msg" =~ ^fix(\(.*\))?:\ (.*)$ ]] || [[ "$msg" =~ ^fix\ (.*)$ ]]; then
category="bug"
cleaned_msg="${BASH_REMATCH[-1]}"
elif [[ "$msg" =~ ^feat(\(.*\))?:\ (.*)$ ]] || [[ "$msg" =~ ^feat\ (.*)$ ]]; then
category="feature"
cleaned_msg="${BASH_REMATCH[-1]}"
Copy link
Preview

Copilot AI Sep 18, 2025

Choose a reason for hiding this comment

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

The categorize_commit function is duplicated between lines 358-393 and 609-638. This creates maintenance overhead and potential inconsistencies. Consider extracting this function to a shared script or define it once and reuse it.

Copilot uses AI. Check for mistakes.

Comment on lines 614 to 625
if [[ "$msg" =~ ^fix(\(.*\))?:\ (.*)$ ]] || [[ "$msg" =~ ^fix\ (.*)$ ]]; then
category="bug"
cleaned_msg="${BASH_REMATCH[-1]}"
elif [[ "$msg" =~ ^feat(\(.*\))?:\ (.*)$ ]] || [[ "$msg" =~ ^feat\ (.*)$ ]]; then
category="feature"
cleaned_msg="${BASH_REMATCH[-1]}"
elif [[ "$msg" =~ ^perf(\(.*\))?:\ (.*)$ ]]; then
category="performance"
cleaned_msg="${BASH_REMATCH[2]}"
elif [[ "$msg" =~ ^refactor(\(.*\))?:\ (.*)$ ]]; then
category="improvement"
cleaned_msg="${BASH_REMATCH[2]}"
Copy link
Preview

Copilot AI Sep 18, 2025

Choose a reason for hiding this comment

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

Inconsistent regex group indexing in the duplicated function. Lines 621, 623 use ${BASH_REMATCH[2]} while the original function at lines 371, 373 correctly uses ${BASH_REMATCH[2]}. However, lines 616, 619 use ${BASH_REMATCH[-1]} which differs from the original function's ${BASH_REMATCH[-1]} for fix/feat but should be consistent with the perf/refactor pattern.

Copilot uses AI. Check for mistakes.

Comment on lines 626 to 629
else
category="other"
cleaned_msg="$msg"
fi
Copy link
Preview

Copilot AI Sep 18, 2025

Choose a reason for hiding this comment

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

The second categorize_commit function is missing several commit types that are handled in the first function (chore, docs). This inconsistency could lead to different categorization behavior between GitHub releases and Google Play Store release notes.

Copilot uses AI. Check for mistakes.

graycreate and others added 2 commits September 19, 2025 00:13
- Include GitHub usernames (@username) for each change
- Add contributors section showing all contributors in the release
- Apply to both English and Chinese release notes for Google Play
- Maintain author attribution throughout the pipeline

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Eliminate duplicate categorize_commit function definitions
- Create shared functions file at /tmp/release_functions.sh
- Ensure consistent categorization across GitHub and Google Play notes
- Fix variable scoping for GITHUB_REPOSITORY in functions
- Include all commit types (chore, docs) in both sections

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@graycreate graycreate merged commit d4d9f31 into main Sep 19, 2025
5 checks passed
@graycreate graycreate deleted the feature/optimize-release-notes branch September 19, 2025 12:42
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.

1 participant