Skip to content

Commit a432b79

Browse files
authored
Merge pull request #62 from php-api-clients/specific-commit-getter-on-repository
Specific commit fetcher on repository
2 parents 4e43e9f + 476d780 commit a432b79

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/Resource/Async/Repository.php

Lines changed: 11 additions & 0 deletions
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)