Skip to content

Commit

Permalink
fix: prevent duplicate commit authors
Browse files Browse the repository at this point in the history
  • Loading branch information
kbond committed Jul 12, 2024
1 parent 936de86 commit bb6e948
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Github/Commit.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ public function authors(): array
}
EOF);

return $this->authors = \array_map(
return $this->authors = \array_unique(\array_map(
fn(array $e) => isset($e['node']['user']['login']) ? '@'.$e['node']['user']['login'] : $e['node']['name'] ?? $e['node']['email'],
$response['data']['repository']['object']['authors']['edges']
);
));
}

public function format(): string
Expand Down

0 comments on commit bb6e948

Please sign in to comment.