Commit 5e71247
Changed files (3)
src
all-badges
delorean
src/all-badges/delorean/delorean.png
Binary file
src/all-badges/delorean/delorean.ts
@@ -0,0 +1,18 @@
+import { BadgePresenter, Present } from '../../badges.js'
+
+export default new (class implements BadgePresenter {
+ url = new URL(import.meta.url)
+ badges = ['delorean'] as const
+ present: Present = (data, grant) => {
+ for (const repo of data.repos) {
+ for (const commit of repo.commits) {
+ const data = new Date(commit.committedDate)
+ if (data.getMonth() === 10 && data.getDate() === 5) {
+ grant('delorean', 'I committed on the day Doctor Emmett Brown invented the flux capacitor!')
+ .evidenceCommits(commit)
+ return
+ }
+ }
+ }
+ }
+})()
src/all-badges/index.ts
@@ -11,4 +11,5 @@ export const allBadges = [
await import('./my-badges-contributor/my-badges-contributor.js'),
await import('./fix-commit/fix-commit.js'),
await import('./chore-commit/chore-commit.js'),
+ await import('./delorean/delorean.js'),
] as const