File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,23 @@ echo -e "\xE2\x9C\x94 created temporary .env file"
7171echo
7272
7373read -p $' \e [1mEnter Webhook URL: \e [22m' webhookurl
74+
75+ # check whether URL is responsive
76+ while true ; do
77+
78+ if grep -q " 200" <<< " $(curl -Is $webhookurl | head -1)" ; then
79+ echo -e " \xE2\x9C\x94 \e[1m\e[38;5;42m$webhookurl \e[39m is up and running\e[22m"
80+ echo
81+ break
82+ else
83+ echo -e " \xE2\x9D\x8C \e[1m\e[91m$webhookurl \e[39m is not responsive as intended.
84+ Please provide a working Webhook URL as pasted in your GitHub App settings from https://smee.io \e[22m"
85+ echo
86+ read -p $' \e [1mEnter Webhook URL: \e [22m' anotherURL
87+ webhookurl=" $anotherURL "
88+ fi
89+ done
90+
7491echo " webhookURL=$webhookurl " >> .env
7592echo -e " \xE2\x9C\x94 set webhookURL to $webhookurl "
7693echo
You can’t perform that action at this time.
0 commit comments