File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ if [ -z "$prq_id" ]; then
58
58
exit 1
59
59
fi
60
60
61
- depthflag=" --depth 1 "
61
+ depthflag=" "
62
62
if test " $depth " -gt 0 2> /dev/null; then
63
63
depthflag=" --depth $depth "
64
64
fi
120
120
source_commit=$( git rev-list --parents -1 $ref | awk ' {print $3}' )
121
121
target_commit=$( git rev-list --parents -1 $ref | awk ' {print $2}' )
122
122
123
+ if [ -z " $source_commit " ]; then
124
+ log " Unable to determine source commit from merge commit $ref . Please verify depth configuration."
125
+ exit 1
126
+ fi
127
+
128
+ if [ -z " $target_commit " ]; then
129
+ log " Unable to determine target commit from merge commit $ref . Please verify depth configuration."
130
+ exit 1
131
+ fi
132
+
123
133
# expose configuration of pull request that can be used in container
124
134
git config --add pullrequest.id $prq_id
125
135
git config --add pullrequest.source_commit $source_commit
You can’t perform that action at this time.
0 commit comments