File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments