Skip to content

Commit 83f9a2d

Browse files
committed
Add author url to getCommit
1 parent 5e52496 commit 83f9a2d

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/VCS/Adapter/Git/GitHub.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,7 @@ public function getCommit(string $owner, string $repositoryName, string $commitH
453453
'commitAuthor' => $response['body']['commit']['author']['name'],
454454
'commitMessage' => $response['body']['commit']['message'],
455455
'commitAuthorAvatar' => $response['body']['author']['avatar_url'],
456+
'commitAuthorUrl' => $response['body']['author']['html_url'],
456457
'commitHash' => $response['body']['sha'],
457458
'commitUrl' => $response['body']['html_url'],
458459
];

tests/VCS/Adapter/GitHubTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,7 @@ public function testGetCommit(): void
326326
$commitDetails = $this->vcsAdapter->getCommit('test-kh', 'test1', '7ae65094d56edafc48596ffbb77950e741e56412');
327327
$this->assertIsArray($commitDetails);
328328
$this->assertEquals('https://avatars.githubusercontent.com/u/43381712?v=4', $commitDetails['commitAuthorAvatar']);
329+
$this->assertEquals('https://github.com/vermakhushboo', $commitDetails['commitAuthorUrl']);
329330
$this->assertEquals('Khushboo Verma', $commitDetails['commitAuthor']);
330331
$this->assertEquals('Initial commit', $commitDetails['commitMessage']);
331332
$this->assertEquals('https://github.com/test-kh/test1/commit/7ae65094d56edafc48596ffbb77950e741e56412', $commitDetails['commitUrl']);

0 commit comments

Comments
 (0)