Skip to content

Commit db46f6a

Browse files
authored
Merge pull request #241 from PrestaEdit/feat/company-github-url
feat(company): expose separate github_url field
2 parents df4563e + 42f99e4 commit db46f6a

3 files changed

Lines changed: 4 additions & 0 deletions

File tree

src/Command/GenerateTopCompaniesCommand.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
126126
$employees,
127127
$companyData['avatar_url'] ?? '',
128128
$companyData['html_url'] ?? '',
129+
$companyData['github_url'] ?? null,
129130
);
130131
}
131132

src/DTO/Company.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ public function __construct(
4545
public readonly array $employees,
4646
public readonly string $avatarUrl,
4747
public readonly string $htmlUrl,
48+
public readonly ?string $githubUrl = null,
4849
) {
4950
$this->slug = self::slugify($this->name);
5051
}
@@ -78,6 +79,7 @@ public function toArray(bool $rankByContributions): array
7879
'contributions_percent' => $this->contributionsPercent,
7980
'avatar_url' => $this->avatarUrl,
8081
'html_url' => $this->htmlUrl,
82+
'github_url' => $this->githubUrl,
8183
'contributors' => array_values(array_unique($this->contributors)),
8284
'employees' => array_map(function (Employee $employee): array {
8385
return [

var/data/companies.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1087,6 +1087,7 @@
10871087
{
10881088
"name": "PrestaEdit",
10891089
"html_url": "https://prestaedit.com/",
1090+
"github_url": "https://github.com/PrestaEdit",
10901091
"avatar_url": "https://avatars.githubusercontent.com/u/2631425",
10911092
"aliases": [
10921093
"@PrestaEdit",

0 commit comments

Comments
 (0)