docs/contrib/discord.md
require 'contrib/discord.php';
Add hook on deploy:
before('deploy', 'discord:notify');
discord_channel – Discord channel ID, requireddiscord_token – Discord channel token, requireddiscord_notify_text – notification message template, markdown supported, default:
:​information_source: **{{user}}** is deploying branch `{{branch}}` to _{{where}}_
discord_success_text – success template, default:
:​white_check_mark: Branch `{{branch}}` deployed to _{{where}}_ successfully
discord_failure_text – failure template, default:
:​no_entry_sign: Branch `{{branch}}` has failed to deploy to _{{where}}_
If you want to notify only about beginning of deployment add this line only:
before('deploy', 'discord:notify');
If you want to notify about successful end of deployment add this too:
after('deploy:success', 'discord:notify:success');
If you want to notify about failed deployment add this too:
after('deploy:failed', 'discord:notify:failure');
return 'https://discordapp.com/api/webhooks/{{discord_channel}}/{{discord_token}}/slack';
Deploy messages
return [
'text' => parse(':​information_source: **{{user}}** is deploying branch `{{what}}` to _{{where}}_'),
];
return [
'text' => parse(':​white_check_mark: Branch `{{what}}` deployed to _{{where}}_ successfully'),
];
return [
'text' => parse(':​no_entry_sign: Branch `{{what}}` has failed to deploy to _{{where}}_'),
];
The message
'discord_notify_text'
Helpers
Tests messages.
Tasks
Notifies Discord.
Notifies Discord about deploy finish.
Notifies Discord about deploy failure.