Skip to content

Commit b4bd7cf

Browse files
committed
Handle file/link contents calls
1 parent bc38891 commit b4bd7cf

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/CommandBus/Handler/Repository/ContentsHandler.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ public function handle(ContentsCommand $command)
4646
new Request('GET', $uri)
4747
)
4848
)->flatMap(function ($contents) {
49+
$parsedContents = $contents->getBody()->getParsedContents();
50+
if (isset($parsedContents['type'])) {
51+
return observableFromArray([$parsedContents]);
52+
}
53+
4954
return observableFromArray($contents->getBody()->getParsedContents());
5055
})->map(function ($content) use ($command) {
5156
$content['repository_fullname'] = $command->getFullname();

0 commit comments

Comments
 (0)