Skip to content

Commit 1bc1f16

Browse files
committed
fix: address Copilot review comments
- Use '.author.login // empty' instead of redundant fallback to .commit.author.name - Add @ prefix to git author name fallback for consistency with original format - Ensures cleaner logic flow and consistent @ prefixes in changelog
1 parent d5ef18d commit 1bc1f16

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,12 +357,12 @@ jobs:
357357
get_github_username() {
358358
local commit_sha="$1"
359359
# Try to get the GitHub username from the commit using gh api
360-
local username=$(gh api "repos/${{ github.repository }}/commits/${commit_sha}" --jq '.author.login // .commit.author.name' 2>/dev/null || echo "")
360+
local username=$(gh api "repos/${{ github.repository }}/commits/${commit_sha}" --jq '.author.login // empty' 2>/dev/null || echo "")
361361
if [ -n "$username" ]; then
362362
echo "@$username"
363363
else
364364
# Fallback to git author name if API fails
365-
echo "$(git show -s --format='%an' $commit_sha)"
365+
echo "@$(git show -s --format='%an' $commit_sha)"
366366
fi
367367
}
368368

0 commit comments

Comments
 (0)