From d138f04f2591fe0d8fb1283c1c5bee8d5e55900b Mon Sep 17 00:00:00 2001 From: Louan Fontenele Date: Sun, 29 Dec 2024 07:14:25 -0300 Subject: [PATCH] =?UTF-8?q?Feature:=20Enhanced=20Changelog=20Categorizatio?= =?UTF-8?q?n=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/release-drafter.yml | 2 +- .github/scripts/generate-changelog.sh | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index e41ab73..7d36028 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -2,7 +2,7 @@ name-template: "Release ${{ nextReleaseVersion }} 🚀" tag-template: "v${{ nextReleaseVersion }}" categories: - - title: "🚀 Features" + - title: "🌟 Features" labels: - "feature" - title: "🐛 Bug Fixes" diff --git a/.github/scripts/generate-changelog.sh b/.github/scripts/generate-changelog.sh index d185e06..d48b265 100644 --- a/.github/scripts/generate-changelog.sh +++ b/.github/scripts/generate-changelog.sh @@ -22,22 +22,22 @@ fi echo "## 🚀 Release $NEW_TAG" echo "### What's Changed" echo "" - - # Append categorized commit history - echo "#### 🚀 Features" - git log --pretty=format:"- ✨ %s by @$GITHUB_USERNAME" $LATEST_TAG..HEAD | grep -i 'feature' || echo "- _No new features_" + + # Append categorized commit history using prefixes (Feature:, Fix:, etc.) + echo "#### 🌟 Features" + git log --pretty=format:"- ✨ %s by @$GITHUB_USERNAME" $LATEST_TAG..HEAD | grep -i '^Feature:' | sed 's/Feature: //g' || echo "- _No new features_" echo "" echo "#### 🐛 Fixes" - git log --pretty=format:"- 🛠️ %s by @$GITHUB_USERNAME" $LATEST_TAG..HEAD | grep -i 'fix' || echo "- _No bug fixes_" + git log --pretty=format:"- 🛠️ %s by @$GITHUB_USERNAME" $LATEST_TAG..HEAD | grep -i '^Fix:' | sed 's/Fix: //g' || echo "- _No bug fixes_" echo "" echo "#### 📄 Documentation" - git log --pretty=format:"- 📝 %s by @$GITHUB_USERNAME" $LATEST_TAG..HEAD | grep -i 'docs' || echo "- _No documentation updates_" + git log --pretty=format:"- 📝 %s by @$GITHUB_USERNAME" $LATEST_TAG..HEAD | grep -i '^Docs:' | sed 's/Docs: //g' || echo "- _No documentation updates_" echo "" echo "#### 🧰 Maintenance" - git log --pretty=format:"- 🔧 %s by @$GITHUB_USERNAME" $LATEST_TAG..HEAD | grep -i 'chore\|refactor' || echo "- _No maintenance updates_" + git log --pretty=format:"- 🔧 %s by @$GITHUB_USERNAME" $LATEST_TAG..HEAD | grep -i '^Chore:\|^Refactor:' | sed 's/Chore: //g; s/Refactor: //g' || echo "- _No maintenance updates_" echo "" echo "---"