master
1import { Commit, define, latest } from '#src'
2
3export default define({
4 url: import.meta.url,
5 badges: ['delorean'] as const,
6 present(data, grant) {
7 const commits: Commit[] = []
8
9 for (const repo of data.repos) {
10 for (const commit of repo.commits) {
11 const data = new Date(commit.committedDate)
12 if (data.getMonth() === 10 && data.getDate() === 5) {
13 commits.push(commit)
14 }
15 }
16 }
17
18 if (commits.length > 0) {
19 grant(
20 'delorean',
21 'I committed on the day Doctor Emmett Brown invented the flux capacitor!',
22 ).evidenceCommits(...commits.sort(latest).slice(0, 6))
23 }
24 },
25})