Skip to content

Commit 2209c84

Browse files
committed
cs
1 parent 92b4b86 commit 2209c84

File tree

4 files changed

+2
-13
lines changed

4 files changed

+2
-13
lines changed

src/Api/Workflow/GithubWorkflowApi.php

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
<?php
22

3-
43
namespace App\Api\Workflow;
54

6-
7-
use App\Api\Label\LabelApi;
85
use App\Model\Repository;
96
use Github\Api\Repository\Actions\WorkflowRuns;
107
use Github\ResultPager;
@@ -30,7 +27,7 @@ public function approveWorkflowsForPullRequest(Repository $repository, string $h
3027
{
3128
$result = $this->resultPager->fetchAllLazy($this->workflowApi, 'all', [$repository->getVendor(), $repository->getName(), [
3229
'branch' => $headBranch,
33-
'status' => 'action_required'
30+
'status' => 'action_required',
3431
]]);
3532

3633
foreach ($result['workflow_runs'] as $run) {

src/Api/Workflow/NullWorkflowApi.php

-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
<?php
22

3-
43
namespace App\Api\Workflow;
54

6-
75
use App\Model\Repository;
86

97
class NullWorkflowApi implements WorkflowApi
108
{
119
public function approveWorkflowsForPullRequest(Repository $repository, string $headRepository, string $headBranch): void
1210
{
13-
1411
}
15-
1612
}

src/Api/Workflow/WorkflowApi.php

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace App\Api\Workflow;
44

5-
65
use App\Model\Repository;
76

87
/**

src/Subscriber/ApproveCiForNonContributors.php

+1-4
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,9 @@
22

33
namespace App\Subscriber;
44

5-
use App\Api\Status\Status;
6-
use App\Api\Status\StatusApi;
75
use App\Api\Workflow\WorkflowApi;
86
use App\Event\GitHubEvent;
97
use App\GitHubEvents;
10-
use App\Service\WipParser;
118
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
129

1310
/**
@@ -32,7 +29,7 @@ public function onPullRequest(GitHubEvent $event)
3229
$headBranch = $data['pull_request']['head']['ref'];
3330
$this->workflowApi->approveWorkflowsForPullRequest($repository, $pullRequestNumber, $headRepository, $headBranch);
3431

35-
$event->setResponseData(['approved_run'=>true]);
32+
$event->setResponseData(['approved_run' => true]);
3633
}
3734

3835
public static function getSubscribedEvents()

0 commit comments

Comments
 (0)