Skip to content

Commit

Permalink
Update update-changelog.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
molanp authored Oct 27, 2024
1 parent 1177d85 commit 36ff6de
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/update-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ jobs:
run: |
if [ -f CHANGELOG.md ]; then
LAST_UPDATE=$(grep -m 1 "## " CHANGELOG.md | awk '{print $2}' | tr -d '[]')
git log --since="$LAST_UPDATE" --pretty=format:"- %s" > commits.txt || echo "No new commits"
git log --since="$LAST_UPDATE" --pretty=format:"- %h: %s" > commits.txt || echo "No new commits"
else
git log --pretty=format:"- %s" > commits.txt || echo "No commits found"
# 如果没有 CHANGELOG.md,获取所有提交
git log --pretty=format:"- %h: %s" > commits.txt || echo "No commits found"
fi
if [[ -s commits.txt ]]; then
Expand Down

0 comments on commit 36ff6de

Please sign in to comment.