mirror of
https://github.com/koodiklinikka/koodiklinikka.fi.git
synced 2026-02-24 00:56:15 +00:00
21 lines
445 B
JavaScript
21 lines
445 B
JavaScript
|
|
export function render(repository, commits) {
|
|
const $commits = commits.map(commit => {
|
|
return `
|
|
<li>
|
|
<span>${commit.message.replace(/\n/g, '<br />')}<span>
|
|
<br /><br />
|
|
<small>${commit.committer.name}</small>
|
|
</li>`;
|
|
});
|
|
|
|
return `
|
|
<h1>${repository.description}</h1>
|
|
<h2>
|
|
<a href="${repository.html_url}">${repository.full_name}</a>
|
|
</h2>
|
|
<ul>${$commits.join('')}</ul>
|
|
`;
|
|
}
|
|
|