Skip to content

Commit

Permalink
Add links; color code dates.
Browse files Browse the repository at this point in the history
Specs older than test suites have red dates.
Test suites newer than the specs have green dates.
  • Loading branch information
BigBlueHat committed Jul 11, 2024
1 parent 121355b commit eb4135c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,15 @@ async function getLatestCommits(repoPairs) {
owner: testSuiteOwner, name: testSuiteName,
} = parseRepositoryUrl(testSuite);
const repoPairWithLatestCommitDates = [{
href: spec,
name: `${specOwner}/${specName}`,
latestCommitDate: specLatestCommitDate,
concerning: specLatestCommitDate > testSuiteLatestCommitDate
}, {
href: testSuite,
name: `${testSuiteOwner}/${testSuiteName}`,
latestCommitDate: testSuiteLatestCommitDate,
ok: testSuiteLatestCommitDate > specLatestCommitDate
}];
result.push(repoPairWithLatestCommitDates);
}
Expand Down
6 changes: 3 additions & 3 deletions templates/readme.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ environment variable when executing the script to generate the table.
{{#each repoPairs}}
{{#each this}}
<tr>
<td>{{name}}</td>
<td>{{latestCommitDate}}</td>
<td><a href="{{href}}">{{name}}</a></td>
<td{{#if concerning}} style="color: red"{{/if}}{{#if ok}} style="color: green"{{/if}}>{{latestCommitDate}}</td>
</tr>
{{/each}}
<tr><td> </td> <td> </td></tr>
<tr style="border: 3px solid black;"></tr>
{{/each}}
</tbody>
</table>
Expand Down

0 comments on commit eb4135c

Please sign in to comment.