-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathProjectGetIssueTypesCommand.php
More file actions
47 lines (38 loc) · 1.11 KB
/
ProjectGetIssueTypesCommand.php
File metadata and controls
47 lines (38 loc) · 1.11 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
namespace App\Commands;
use Coding\ProjectSetting;
use LaravelZero\Framework\Commands\Command;
class ProjectGetIssueTypesCommand extends Command
{
use WithCoding;
/**
* The signature of the command.
*
* @var string
*/
protected $signature = 'project:get-issue-types
{--coding_token= : CODING 令牌}
{--coding_team_domain= : CODING 团队域名,如 xxx.coding.net 即填写 xxx}
{--coding_project_uri= : CODING 项目标识,如 xxx.coding.net/p/yyy 即填写 yyy}
';
/**
* The description of the command.
*
* @var string
*/
protected $description = '获取项目下的事项类型';
/**
* Execute the console command.
*
*/
public function handle(ProjectSetting $projectSetting): int
{
$this->setCodingApi();
$projectSetting->setToken($this->codingToken);
$result = $projectSetting->getIssueTypes(['ProjectName' => $this->codingProjectUri]);
foreach ($result as $item) {
$this->info($item['Id'] . ' ' . $item['Name']);
}
return 0;
}
}