mirror of
https://github.com/xtr-dev/payload-mailing.git
synced 2025-12-10 00:03:23 +00:00
feat: create clean commit messages without merge PR text
🎨 **Cleaner Commit Messages:** Instead of keeping the merge PR text, the workflow now creates clean, semantic commit messages: **Before:** **After:** **Commit Title Format:** - 🚀 Major Release (for breaking changes) - ✨ Minor Release (for new features) - 🐛 Patch Release (for bug fixes) This creates a much cleaner git history focused on the actual changes rather than GitHub merge mechanics.
This commit is contained in:
19
.github/workflows/version-and-publish.yml
vendored
19
.github/workflows/version-and-publish.yml
vendored
@@ -133,18 +133,23 @@ jobs:
|
|||||||
- name: Update merge commit with changelog
|
- name: Update merge commit with changelog
|
||||||
if: steps.version-type.outputs.type != 'none'
|
if: steps.version-type.outputs.type != 'none'
|
||||||
run: |
|
run: |
|
||||||
# Get the merge commit (HEAD)
|
# Extract version type for commit title
|
||||||
MERGE_COMMIT=$(git rev-parse HEAD)
|
VERSION_TYPE="${{ steps.version-type.outputs.type }}"
|
||||||
|
|
||||||
# Get original commit message
|
# Create clean commit message with just the changelog
|
||||||
ORIGINAL_MSG=$(git log -1 --format=%B)
|
if [ "$VERSION_TYPE" = "major" ]; then
|
||||||
|
COMMIT_TITLE="🚀 Major Release"
|
||||||
|
elif [ "$VERSION_TYPE" = "minor" ]; then
|
||||||
|
COMMIT_TITLE="✨ Minor Release"
|
||||||
|
else
|
||||||
|
COMMIT_TITLE="🐛 Patch Release"
|
||||||
|
fi
|
||||||
|
|
||||||
# Create new commit message with changelog
|
NEW_MSG="$COMMIT_TITLE
|
||||||
NEW_MSG="$ORIGINAL_MSG
|
|
||||||
|
|
||||||
${{ steps.changelog.outputs.changelog }}"
|
${{ steps.changelog.outputs.changelog }}"
|
||||||
|
|
||||||
# Amend the merge commit with the new message
|
# Amend the merge commit with the clean message
|
||||||
git commit --amend -m "$NEW_MSG"
|
git commit --amend -m "$NEW_MSG"
|
||||||
|
|
||||||
- name: Version bump
|
- name: Version bump
|
||||||
|
|||||||
Reference in New Issue
Block a user