Skip to content
This repository was archived by the owner on Apr 26, 2020. It is now read-only.

Commit eab3b3b

Browse files
lucasmezencioantonmedv
authored andcommitted
Allow messages to be complex on Discord recipe (#185)
* Allow messages to be complex * Update CHANGELOG * Update CHANGELOG.md
1 parent c15a8e8 commit eab3b3b

3 files changed

Lines changed: 30 additions & 22 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
- Added Google Hangouts Chat recipe, based on Slack recipe.
1010

1111
### Fixed
12-
1312
- Fixed telegram recipe (#170) and updated docs
1413
- Fixed newrelic recipe
1514
- Fixed discord recipe (#181) and updated docs
15+
- Fixed sending complex messages to discord
1616

1717
## 6.0.2
1818
[6.0.1...6.0.2](https://github.com/deployphp/recipes/compare/6.0.1...6.0.2)
@@ -31,5 +31,4 @@
3131
[6.0.0...6.0.1](https://github.com/deployphp/recipes/compare/6.0.0...6.0.1)
3232

3333
### Fixed
34-
3534
- Fixed bug with test func in rsync recipe

README.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This repository contains third party recipes to integrate with deployer.
77
## Installing
88

99
~~~sh
10-
composer require deployer/recipes --dev
10+
composer require deployer/recipes --dev
1111
~~~
1212

1313
Include recipes in `deploy.php` file.
@@ -18,24 +18,25 @@ require 'recipe/slack.php';
1818

1919
## Recipes
2020

21-
| Recipe | Docs
22-
| ------ | ----
23-
| bugsnag | [read](docs/bugsnag.md)
24-
| cachetool | [read](docs/cachetool.md)
21+
| Recipe | Docs
22+
| ------ | ----
23+
| bugsnag | [read](docs/bugsnag.md)
24+
| cachetool | [read](docs/cachetool.md)
2525
| cloudflare | [read](docs/cloudflare.md)
26-
| hipchat | [read](docs/hipchat.md)
27-
| newrelic | [read](docs/newrelic.md)
28-
| npm | [read](docs/npm.md)
29-
| phinx | [read](docs/phinx.md)
30-
| rabbit | [read](docs/rabbit.md)
31-
| rollbar | [read](docs/rollbar.md)
32-
| rsync | [read](docs/rsync.md)
33-
| sentry | [read](docs/sentry.md)
34-
| slack | [read](docs/slack.md)
26+
| discord | [read](docs/discord.md)
27+
| hipchat | [read](docs/hipchat.md)
28+
| newrelic | [read](docs/newrelic.md)
29+
| npm | [read](docs/npm.md)
30+
| phinx | [read](docs/phinx.md)
31+
| rabbit | [read](docs/rabbit.md)
32+
| rollbar | [read](docs/rollbar.md)
33+
| rsync | [read](docs/rsync.md)
34+
| sentry | [read](docs/sentry.md)
35+
| slack | [read](docs/slack.md)
3536
| telegram  | [read](docs/telegram.md)
3637
| yammer    | [read](docs/yammer.md)
37-
| yarn | [read](docs/yarn.md)
38-
| raygun | [read](docs/raygun.md)
38+
| yarn | [read](docs/yarn.md)
39+
| raygun | [read](docs/raygun.md)
3940

4041

4142
## Contributing

recipe/discord.php

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,24 @@
99
});
1010

1111
// Deploy messages
12-
set('discord_notify_text', ':information_source: **{{user}}** is deploying branch `{{branch}}` to _{{target}}_');
13-
set('discord_success_text', ':white_check_mark: Branch `{{branch}}` deployed to _{{target}}_ successfully');
14-
set('discord_failure_text', ':no_entry_sign: Branch `{{branch}}` has failed to deploy to _{{target}}_');
12+
set('discord_notify_text', [
13+
'text' => ':information_source: **{{user}}** is deploying branch `{{branch}}` to _{{target}}_',
14+
]);
15+
set('discord_success_text', [
16+
'text' => ':white_check_mark: Branch `{{branch}}` deployed to _{{target}}_ successfully',
17+
]);
18+
set('discord_failure_text', [
19+
'text' => ':no_entry_sign: Branch `{{branch}}` has failed to deploy to _{{target}}_',
20+
]);
1521

1622
// The message
1723
set('discord_message', 'discord_notify_text');
1824

1925
// Helpers
2026
task('discord_send_message', function(){
21-
Httpie::post(get('discord_webhook'))->body(['text' => get(get('discord_message'))])->send();
27+
$message = get(get('discord_message'));
28+
29+
Httpie::post(get('discord_webhook'))->body($message)->send();
2230
});
2331

2432
// Tasks

0 commit comments

Comments
 (0)