master
1import { Commit, define } from '#src'
2
3export default define({
4 url: import.meta.url,
5 badges: ['revert-revert-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 (/Revert.+Revert/.test(commit.message)) {
12 commits.push(commit)
13 }
14 }
15 }
16
17 if (commits.length > 0) {
18 grant(
19 'revert-revert-commit',
20 'I reverted a revert commit.',
21 ).evidenceCommits(...commits)
22 }
23 },
24})