-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconsole
executable file
·33 lines (26 loc) · 859 Bytes
/
console
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/local/bin/php
<?php
/**
* This example demonstrates how to notify via Email to the people assigned to the JIRA-tickets
* using the ENV parameters (from the .env file)
*/
declare(strict_types=1);
require dirname(__DIR__) . '/../vendor/autoload.php';
use Chemaclass\JiraStatusNotifier\Domain\Channel\Email\EmailChannel;
use Chemaclass\JiraStatusNotifier\Domain\Common\EnvKeys;
use Chemaclass\JiraStatusNotifier\JiraStatusNotifierFacade;
use Dotenv\Dotenv;
use Gacela\Framework\Gacela;
Dotenv::create(__DIR__)->load();
EnvKeys::create((array)getenv())->validate(file_get_contents(__DIR__ . '/.env.dist'));
Gacela::bootstrap(__DIR__, [
'config' => [
'type' => 'env',
'path' => '.env',
],
]);
$facade = new JiraStatusNotifierFacade();
$result = $facade->handle([
EmailChannel::class,
]);
$facade->renderOutput($result);