-
Notifications
You must be signed in to change notification settings - Fork 46
feat: improve release notes generation with categorization #118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- 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>
There was a problem hiding this 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.
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]}" |
There was a problem hiding this comment.
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.
.github/workflows/release.yml
Outdated
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]}" |
There was a problem hiding this comment.
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.
.github/workflows/release.yml
Outdated
else | ||
category="other" | ||
cleaned_msg="$msg" | ||
fi |
There was a problem hiding this comment.
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.
- 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>
Summary
Changes
🚀 Release Notes Categorization
feat:
commits)fix:
commits)refactor:
commits)perf:
commits)chore:
commits) - hidden by default📝 Message Formatting
(#123)
)fix:
,feat:
, etc.)🌐 Localization
Test Plan
The improved release notes will be generated on the next release. The categorization logic:
Example Output
Instead of:
Now generates:
🤖 Generated with Claude Code