Skip to content

Commit a5970db

Browse files
committed
fix: verify how it works
1 parent fddc2be commit a5970db

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.github/workflows/pr.yml

+8-3
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,14 @@ jobs:
2828

2929
- name: Get commit messages
3030
run: |
31-
git log --pretty=format:'%s' --abbrev-commit ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} > commits.txt
32-
echo "Commit Messages:"
33-
cat commits.txt
31+
BODY=$(git log \
32+
--abbrev-commit ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} \
33+
--pretty=format:'* %s%n%n%b')
34+
TITLE=${{ github.event.pull_request.title }}
35+
36+
echo "${TITLE}\n${BODY}" > commit-message.txt
37+
cat commit-message.txt
38+
cat commit-message.txt | npx commitlint
3439
3540
check-file-format:
3641
name: Check files changes follow guidelines

0 commit comments

Comments
 (0)