@@ 43-54 (lines=12) @@ | ||
40 | /** |
|
41 | * @command pr:close |
|
42 | */ |
|
43 | public function prClose($projectWithOrg = '', $number = '', $options = ['as' => 'default']) |
|
44 | { |
|
45 | if (empty($number) && preg_match('#^[0-9]*$#', $projectWithOrg)) { |
|
46 | $number = $projectWithOrg; |
|
47 | $projectWithOrg = ''; |
|
48 | } |
|
49 | $projectWithOrg = $this->projectWithOrg($projectWithOrg); |
|
50 | list($org, $project) = explode('/', $projectWithOrg, 2); |
|
51 | ||
52 | $api = $this->api($options['as']); |
|
53 | $api->prClose($org, $project, $number); |
|
54 | } |
|
55 | ||
56 | /* |
|
57 | * hubph pr:check --vid=php-7.0./31 --vid=php-7.1./20 |
|
@@ 545-560 (lines=16) @@ | ||
542 | * @default-string-field description |
|
543 | * @return Consolidation\OutputFormatters\StructuredData\RowsOfFields |
|
544 | */ |
|
545 | public function prStatuses($projectWithOrg = '', $number = '', $options = ['as' => 'default', 'format' => 'yaml']) |
|
546 | { |
|
547 | if (empty($number) && preg_match('#^[0-9]*$#', $projectWithOrg)) { |
|
548 | $number = $projectWithOrg; |
|
549 | $projectWithOrg = ''; |
|
550 | } |
|
551 | $api = $this->api($options['as']); |
|
552 | $projectWithOrg = $this->projectWithOrg($projectWithOrg); |
|
553 | ||
554 | $pullRequestStatus = $api->prStatuses($projectWithOrg, $number); |
|
555 | ||
556 | $result = new RowsOfFields($pullRequestStatus); |
|
557 | $this->addTableRenderFunction($result); |
|
558 | ||
559 | return $result; |
|
560 | } |
|
561 | ||
562 | /** |
|
563 | * @command pr:list |