-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathapplication.php
executable file
·29 lines (25 loc) · 1016 Bytes
/
application.php
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
#!/usr/bin/env php
<?php
require __DIR__.'/vendor/autoload.php';
use DAG\JIRA\Post\Command\PostMessageCommand;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Input\ArgvInput;
$input = new ArgvInput(
[
basename(__FILE__),
'post-message',
isset($_SERVER['git_branch']) ? $_SERVER['git_branch'] : null,
isset($_SERVER['jira_user']) ? $_SERVER['jira_user'] : null,
isset($_SERVER['jira_password']) ? $_SERVER['jira_password'] : null,
isset($_SERVER['jira_build_message']) ? $_SERVER['jira_build_message'] : null,
isset($_SERVER['jira_url']) ? $_SERVER['jira_url'] : null,
isset($_SERVER['jira_project']) ? $_SERVER['jira_project'] : null,
isset($_SERVER['jira_issue_key']) ? "--jira-issue-key=".$_SERVER['jira_issue_key'] : null,
]
);
$application = new Application(
'Post JIRA comment with build details',
'@package_version@'
);
$application->add(new PostMessageCommand());
$application->run($input);