Skip to content

Commit 99565d9

Browse files
committed
更新 release.yml,修改获取最后正常提交的逻辑,使用 git diff 命令替代 git rev-list,提升了发布日志生成的准确性和代码的可读性。
1 parent bc0b99f commit 99565d9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
id: diff
4242
run: |
4343
git log -1 --pretty=format:"%s%n%n%b" > commit_msg.txt
44-
LAST_NORMAL_COMMIT=$(git rev-list --no-merges -n 1 HEAD)
44+
LAST_NORMAL_COMMIT=$(git diff HEAD^ HEAD)
4545
git show --pretty="" $LAST_NORMAL_COMMIT > diff.txt
4646
4747
- name: Generate AI Release Notes

0 commit comments

Comments
 (0)