Skip to content

Commit daf6ea6

Browse files
authored
Run the script in the current folder
The script was always verifying its own repository's commit messages
1 parent 80191e1 commit daf6ea6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

verify_commit_messages_in_branch.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
set -eu
66

77
script_dir=$(dirname "$0")
8-
commits_since_master=$(git -C $script_dir rev-list HEAD ^origin/master)
8+
commits_since_master=$(git rev-list HEAD ^origin/master)
99

1010
while read -r commit_hash; do
11-
commit_message="$(git -C $script_dir log --format=%B -n 1 $commit_hash)"
11+
commit_message="$(git log --format=%B -n 1 $commit_hash)"
1212
python3 $script_dir/bad_commit_message_blocker.py --message "$commit_message"
1313
done <<< "$commits_since_master"

0 commit comments

Comments
 (0)