Skip to content

Commit 77de3cf

Browse files
committed
fixup
1 parent 14182e4 commit 77de3cf

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

unknown-words.sh

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -185,16 +185,15 @@ bullet_words() {
185185
echo "$1" | perl -pne 's/^(.)/* $1/'
186186
rm -f "$run_warnings"
187187
export tokens="$1"
188+
head=$(cat $GITHUB_EVENT_PATH | jq -r '.pull_request.head.sha' -M)
189+
if [ "$head" = "null" ]; then
190+
head=${GITHUB_SHA:-HEAD}
191+
fi
188192
base=$(cat $GITHUB_EVENT_PATH | jq -r '.pull_request.base.sha // .before // "HEAD^"' -M)
189-
if [ "$base" != "HEAD^" ]; then
190-
head=$(cat $GITHUB_EVENT_PATH | jq -r '.pull_request.head.sha' -M)
191-
if [ "$head" = "null" ]; then
192-
head=${GITHUB_SHA:-HEAD}
193-
fi
194-
else
195-
head=HEAD
193+
if ! git show $base 2>/dev/null >/dev/null; then
194+
base=$head^
196195
fi
197-
if [ -z "$ONLY_REPORT_HEAD" ] && !git log $base 2>/dev/null >/dev/null; then
196+
if [ -z "$ONLY_REPORT_HEAD" ] && !git show $base 2>/dev/null >/dev/null; then
198197
ONLY_REPORT_HEAD=1
199198
fi
200199
if [ -z "$ONLY_REPORT_HEAD" ]; then

0 commit comments

Comments
 (0)