8000 Specific commit fetcher on repository · php-api-clients/github@476d780 · GitHub
[go: up one dir, main page]

Skip to content

Commit 476d780

Browse files
committed
Specific commit fetcher on repository
1 parent bd9a1fd commit 476d780

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/Resource/Async/Repository.php

+11
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
use ApiClients\Client\Github\CommandBus\Command\Repository\CommunityHealthCommand;
1414
use ApiClients\Client\Github\CommandBus\Command\Repository\Contents\FileUploadCommand;
1515
use ApiClients\Client\Github\CommandBus\Command\Repository\ContentsCommand;
16+
use ApiClients\Client\Github\CommandBus\Command\Repository\DetailedCommitCommand;
1617
use ApiClients\Client\Github\CommandBus\Command\Repository\LabelsCommand;
1718
use ApiClients\Client\Github\CommandBus\Command\Repository\LanguagesCommand;
1819
use ApiClients\Client\Github\CommandBus\Command\Repository\RefCommand;
@@ -61,6 +62,16 @@ public function commits(): ObservableInterface
6162
));
6263
}
6364

65+
public function specificCommit(string $sha): PromiseInterface
66+
{
67+
return $this->handleCommand(
68+
new DetailedCommitCommand(
69+
$this->fullName(),
70+
$sha
71+
)
72+
);
73+
}
74+
6475
public function labels(): ObservableInterface
6576
{
6677
return unwrapObservableFromPromise($this->handleCommand(

0 commit comments

Comments
 (0)
0