deployer icon indicating copy to clipboard operation
deployer copied to clipboard

Discord notifications with custom text

Open bbashy opened this issue 3 years ago • 0 comments

Discussed in https://github.com/deployphp/deployer/discussions/2682

Originally posted by bbashy October 7, 2021 So trying out version 7 again and I'm trying to customise the Discord text as per the docs https://deployer.org/docs/7.x/contrib/discord

When I add;

set('discord_notify_text', ":information_source: Website is being deployed using `{{branch}}` branch.");

it says;

Deployer\Utility\Httpie::body(): Argument #1 ($data) must be of type array, string given, called in phar:///usr/local/bin/dep/contrib/discord.php on line 87

And when I do;

set('discord_notify_text', ['text' => ":information_source: Website is being deployed using `{{branch}}` branch"]);

{{branch}} doesn't get parsed so I see that exactly.

If I add parse() around the text, I get;

Deployer\Exception\Exception  in Context.php on line 67:

  Context was requested but was not available.
```</div>

bbashy avatar Oct 07 '21 13:10 bbashy