Skip to content
This repository has been archived by the owner on Jul 28, 2024. It is now read-only.

Commit

Permalink
[#853] Added commit author to 'getCommits' API endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
vasek committed Apr 6, 2016
1 parent 7316b03 commit 6bc2b38
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions frontend/src/Commits/Commits.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ interface Commit {
isMerge: boolean;
environment: string;
changes: Change[];
author: {
name: string;
email: string;
avatar: string;
}
}

interface Change {
Expand Down
5 changes: 5 additions & 0 deletions plugins/versionpress/src/Api/VersionPressApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,11 @@ public function getCommits(WP_REST_Request $request) {
"isMerge" => $commit->isMerge(),
"environment" => $environment,
"changes" => array_merge($this->convertChangeInfoList($changeInfoList), $fileChanges),
"author" => array(
"name" => $commit->getAuthorName(),
"email" => $commit->getAuthorEmail(),
"avatar" => get_avatar_url($commit->getAuthorEmail())
)
);
$isFirstCommit = false;
}
Expand Down

0 comments on commit 6bc2b38

Please sign in to comment.