File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -14,9 +14,11 @@ cache:
1414install :
1515 - pip3 install textblob
1616 - python3 -m textblob.download_corpora
17+ - git config remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
18+ - git fetch --all
1719
1820script :
1921 # Run the unit tests (you probably don't need to run this in your CI)
2022 - pytest bad_commit_message_blocker_tests.py
21- # Run the script passing the current commit message as argument
22- - python3 bad_commit_message_blocker.py --message "$TRAVIS_COMMIT_MESSAGE"
23+ # Verify that all commit messages in current branch abide by the best practices
24+ - bash multiple_commits.sh
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -eu
3+
4+ commits_since_master=$( git rev-list HEAD ^origin/master)
5+
6+ while read -r commit_hash; do
7+ commit_message=" $( git log --format=%B -n 1 $commit_hash ) "
8+ python3 bad_commit_message_blocker.py --message " $commit_message "
9+ done <<< " $commits_since_master"
You can’t perform that action at this time.
0 commit comments