Successful deploy Slack notification has wrong draft URL

Hi y’all!

I’m currently deploying a site (both as drafts and to production) using netlify-cli on a GitLab CI runner. The command to deploy drafts I use is the following:

netlify deploy --site $NETLIFY_SITE_ID --auth $NETLIFY_AUTH_TOKEN --json | tee deployResults.json

Deploys are successfull, but the Slack integration which posts this message when a deploy is successful has the production URL in the title. I would prefer if it would directly link to the deployed draft subdomain (under netlify.app).

I’ve tried looking for an option to change this behavior, but I can’t find it anywhere. iirc the link is correct for Netlify regular builds, it’s just deploys through netlify-cli that are failing.

The site ID is hocus-app.netlify.app (or time.hocus.app).

Hi @hugmanrique and welcome to our community. I can’t tell from your screenshot what is wrong exactly - I can’t see the link in your image :slight_smile:

Could you tell me what it links to, for some specific deploy, which you also link me to the logs for in our UI?

Sure,

“Visit the changes live” links to https://time.hocus.app (incorrect)
“build log” links to https://app.netlify.com/sites/hocus-app/deploys/5eb4497ebcf4b66edd731af6 (correct)
“Preview deploy” in build log page links to https://5eb4497ebcf4b66edd731af6--hocus-app.netlify.app/ (correct).

I would expect “Visit the changes live” to be the same as “Preview deploy” (which is correct).

I cannot post the URLs :frowning: https://pastebin.com/tiuNRfLk

Thanks so much! We do have an open feature request on the topic to which I’ve added your voice. I don’t see that changing in the near future but if it does, I’ll follow up in this thread with details!