We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a62daa9 commit 7891040Copy full SHA for 7891040
1 file changed
src/Jobs/ProcessAggregatedEvents.php
@@ -20,12 +20,15 @@ class ProcessAggregatedEvents implements ShouldQueue
20
21
protected string $nodeId;
22
23
+ protected GithubService $githubService;
24
+
25
/**
26
* Create a new job instance.
27
*/
- public function __construct(string $nodeId)
28
+ public function __construct(string $nodeId, GithubService $githubService)
29
{
30
$this->nodeId = $nodeId;
31
+ $this->githubService = $githubService;
32
}
33
34
@@ -55,8 +58,7 @@ public function handle(): void
55
58
)->render();
56
59
57
60
Log::info('ProcessAggregatedEvents: Message: '.$message);
- $githubService = new GithubService;
- $githubService->commentOnNode($this->nodeId, $message);
61
+ $this->githubService->commentOnNode($this->nodeId, $message);
62
63
64
0 commit comments