Skip to content

Commit 9422719

Browse files
committed
fix(workflows): missing vars
1 parent f9123fd commit 9422719

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

workflows/main/commit_lint.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ To fix all, try 'git rebase -i $revision', change bad commits to 'reword', fix m
117117
}
118118

119119
# Description: Check if commit messages are spelled properly
120-
# Globals : CSPELL_CONFIG_PATH (github workflow)
120+
# Globals : CSPELL_CONFIG_PATH, BASE_REF (github workflow)
121121
# Args : 1=git log
122122
# STDOUT : Ok message
123123
# STDERR : Might print errors and logs
@@ -126,6 +126,7 @@ To fix all, try 'git rebase -i $revision', change bad commits to 'reword', fix m
126126
spellcheck_log() {
127127
# shellcheck disable=SC2155
128128
local log="$1" issues=$(cspell --config="$CSPELL_CONFIG_PATH" stdin <<<"$git_log")
129+
local revision="refs/remotes/origin/${BASE_REF}..HEAD"
129130

130131
if [ ! "$issues" ]; then
131132
msgln "spellcheck commits ok"
@@ -157,7 +158,7 @@ fi
157158
validate
158159
lint_title
159160

160-
git_log=$(git log --format=%s "$revision" --)
161+
git_log=$(git log --format=%s "refs/remotes/origin/${BASE_REF}..HEAD" --)
161162

162163
lint_log "$git_log"
163164
spellcheck_log "$git_log"

0 commit comments

Comments
 (0)