open-wa / wa-automate-nodejs

💬 🤖 The most reliable tool for chatbots with advanced features. Be sure to 🌟 this repository for updates!
https://docs.openwa.dev/
Other
3.08k stars 592 forks source link

Webhook Registration #1942

Closed cosmo83 closed 2 years ago

cosmo83 commented 2 years ago

If iam passing the webhook using the latest version of EasyAPI with -w , or --webhook, you are checking this with isUrl

if(c.webhook || c.webhook == '') { if(isUrl(c.webhook) || Array.isArray(c.webhook)) { spinner.succeed('webhooks set already') } else { if(c.webhook == '') c.webhook = 'webhooks.json'; c.webhook = tryOpenFileAsObject(c.webhook, true); if(!isUrl(c.webhook)) { c.webhook = undefined } } }

The isUrl does not work for custom urls for example when we are trying to run this as part of other containers in docker-compose / kubernetes.

image

Though this is not trivial, please look at some other options. It took me a while to figure out the issue.

smashah commented 2 years ago

pretty sure this is related to https://github.com/open-wa/wa-automate-docker/issues/20

smashah commented 2 years ago

@github-actions run

⚡ Release! ⚡ ```js (async () => { function exec(cmd) { console.log(execSync(cmd).toString()); } // Config const gitUserEmail = "github-actions[bot]@users.noreply.github.com"; const gitUserName = "github-actions[bot]"; exec(`echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc`); exec(`git config --global user.email "${gitUserEmail}"`); exec(`git config --global user.name "${gitUserName}"`); exec(`npm i -D`); exec(`npm run release-ci`); //comment on the issue var result = execSync(`npx auto-changelog -o ./tempchangelog.txt --commit-limit false --template ./compact-keepachangelog.hbs --stdout`).toString(); await postComment(result); //create changelog image exec(`npm run release-image`); exec(`git commit -a -m 'updated release-image'`); exec(`git push --force`); })(); ```
smashah commented 2 years ago

Changelog

🚀 Release 4.12.2 (2021-07-28)

smashah commented 2 years ago

@cosmo83 please update your version and use the --skip-url-check

thanks