Skip to content

Commit

Permalink
👷 chore(pre-commit): ignore TODO in changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
welpo committed Dec 30, 2023
1 parent 527d209 commit b16ad26
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,13 @@ fi
# Get the newly added and modified files.
all_changed_files=$(git diff --cached --name-only --diff-filter=AM)

script_name=$(basename "$0")
# Loop through all newly added or modified files.
for file in $all_changed_files; do
# Ignore this script.
if [[ "$file" == "$0" ]]; then
file_name=$(basename "$file")

# Ignore this script and the changelog.
if [[ "$file_name" == "$script_name" ]] || [[ "$file_name" == "CHANGELOG.md" ]]; then
continue
fi

Expand Down

0 comments on commit b16ad26

Please sign in to comment.