Skip to content

Commit 2fdc174

Browse files
committed
ci(ci): enable checks on both push and pull_request 🚀
1 parent 3147ea2 commit 2fdc174

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

.github/workflows/standard-repo.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Commit Base Checks
22

33
on:
4+
push:
5+
branches:
6+
- main
47
pull_request:
58
types: [opened, edited, synchronize, reopened]
69

@@ -14,6 +17,10 @@ jobs:
1417
- name: Lint commit messages
1518
run: |
1619
COMMITS=$(git log origin/main..HEAD --pretty=format:"%s")
20+
if [ -z "$COMMITS" ]; then
21+
echo "No new commit messages to check. Skipping commit lint."
22+
exit 0
23+
fi
1724
echo "::group::Commit messages"
1825
echo "$COMMITS"
1926
echo "::endgroup::"

0 commit comments

Comments
 (0)