master
1import { Commit, define } from '#src'
2
3export default define({
4 url: import.meta.url,
5 badges: ['epic-commit'] 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 if (commit.message.length >= 500) {
12 commits.push(commit)
13 }
14 }
15 }
16
17 if (commits.length > 0) {
18 grant(
19 'epic-commit',
20 'I made an epic commit with a message over 500 chars.',
21 ).evidenceCommits(...commits)
22 }
23 },
24})