Skip to content

Commit d318070

Browse files
committed
Add capability for different base path of bitbucket, so that it can run on something else than /
1 parent 154c93b commit d318070

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

assets/check

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,19 @@ if [ -n "$pull_requests" ]; then
6666
uri_parser "$uri"
6767
repo_host="${uri_schema}://${uri_address}"
6868

69+
# get base path in case bitbucket does not run on /
70+
base_path=""
71+
for i in "${!uri_parts[@]}"
72+
do
73+
if [ ${uri_parts[$i]} = "scm" ]; then
74+
break
75+
fi
76+
77+
base_path=$base_path"/"${uri_parts[$i]}
78+
done
79+
80+
repo_host=${repo_host}${base_path}
81+
6982
versions="[]"
7083
while read pull_request ; do
7184
log "Verifying pull request"

0 commit comments

Comments
 (0)