Skip to content

Commit 536aa0f

Browse files
committed
refactor: init support for bitbucket
1 parent b453437 commit 536aa0f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

please

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,10 @@ trigger() # $1 = event
206206
fi
207207
}
208208

209+
VCS=${VCS:-github.com}
209210
GCFMT="%s (%an)" # git commit log format
210-
REPO=$(git config --get remote.origin.url | sed -e 's/[email protected]://;s/https:\/\/github.com\///;s/.git//')
211+
REPO=$(git config --get remote.origin.url | sed -e "s/git@$VCS://;s/https:\/\/$VCS\///;s/\.git//")
212+
[[ "$VCS" == *"bitbucket"* ]] && CMT=commits || CMT=commit
211213

212214
# load events
213215
[[ -f ./please.json ]] && eval $(cat ./please.json | jq -r 'to_entries|map("EVENTS[\(.key)]=\"\(.value)\"")|.[]')

0 commit comments

Comments
 (0)