Add link to Github for each commit in an ebooks short commit history

This commit is contained in:
Alex Cabal 2020-06-03 12:01:09 -05:00
parent 08f707e342
commit 25c40e3e67
3 changed files with 7 additions and 5 deletions

View file

@ -124,11 +124,11 @@ class Ebook{
}
// Fill in the short history of this repo.
$historyEntries = explode("\n", shell_exec('cd ' . escapeshellarg($this->RepoFilesystemPath) . ' && git log -n5 --pretty=format:"%ct %s"') ?? '');
$historyEntries = explode("\n", shell_exec('cd ' . escapeshellarg($this->RepoFilesystemPath) . ' && git log -n5 --pretty=format:"%ct %H %s"') ?? '');
foreach($historyEntries as $entry){
$array = explode(' ', $entry, 2);
$this->GitCommits[] = new GitCommit($array[0], $array[1]);
$array = explode(' ', $entry, 3);
$this->GitCommits[] = new GitCommit($array[0], $array[1], $array[2]);
}
// Get cover image URLs.