Does cli deploy - -message work with - -trigger?


Can anyone confirm Netlify CLI deploy message flag works when run alongside the trigger flag, please? It doesn’t seem to be working on my end.

The following variations trigger the build from main@HEAD on my repo but, I don’t get a deploy message. It just says, “No deploy message” on the Netlify Deploys listing page. And I’m not seeing a message in the logs, either ,but that’s just an aside, as I don’t know if messages end up in logs, either way:

netlify deploy --message "My Message" --trigger
netlify deploy --trigger --message "Just a Message"
netlify deploy --trigger --message="Just another Message"
netlify deploy --trigger -m "And a Message"

Note: I’m running this through a Github Action (workflow) but, have run the commands directly from my local machine and nothing; no deploy message.

I could be wrong but, looking over the deploy command code, I’m not seeing a condition/param for the --message flag. Should I post an issue there?

Hi @Natetronn

Given the following line inside the triggerDeploy function

const siteBuild = await api.createSiteBuild({ siteId })

which only passes the siteId, coupled with the documentation which states

Trigger a new build of your site on Netlify without uploading local files

I would say no --trigger does nothing more than trigger a new build. Nothing other than the siteId is sent through.

Hi @coelmay, thanks for the reply, I appreciate it.

If you would like to have a message sent along with a trigger, you could change the issue you logged on GitHub and make it a feature request instead. The maintainers/contributors of the project could then evaluate it and possibly implement it in a future version.

I’ve closed that post and started a new feature request using the feature request template. It’s here if anyone’s interested:

1 Like

Thanks so much for linking that feature request! I am sure it will be beneficial to additional Forums members who are looking for something similar.