File tree Expand file tree Collapse file tree 1 file changed +27
-4
lines changed Expand file tree Collapse file tree 1 file changed +27
-4
lines changed Original file line number Diff line number Diff line change 77co_author_re = re .compile (r"Co-authored-by: (?P<name>[^<]+?) <(?P<email>.+)>" )
88
99
10+ ignored = [
11+ {"name" : "dependabot[bot]" },
12+ {"name" : "pre-commit-ci[bot]" },
13+ {
14+ "name" : "Claude" ,
15+ "email" : [
16+ "noreply@anthropic.com" ,
17+ "claude@anthropic.com" ,
18+ "no-reply@anthropic.com" ,
19+ ],
20+ },
21+ ]
22+
23+
24+ def is_ignored (name , email ):
25+ # linear search, for now
26+ for ignore in ignored :
27+ if ignore ["name" ] != name :
28+ continue
29+ ignored_email = ignore .get ("email" )
30+ if ignored_email is None or email in ignored_email :
31+ return True
32+
33+ return False
34+
35+
1036def main ():
1137 repo = git .Repo ("." )
1238
@@ -22,11 +48,8 @@ def main():
2248
2349 # deduplicate and ignore
2450 # TODO: extract ignores from .github/release.yml
25- ignored = ["dependabot" , "pre-commit-ci" ]
2651 unique_contributors = unique (
27- contributor
28- for contributor in contributors .values ()
29- if contributor .removesuffix ("[bot]" ) not in ignored
52+ name for email , name in contributors .items () if not is_ignored (name , email )
3053 )
3154
3255 sorted_ = sorted (unique_contributors )
You can’t perform that action at this time.
0 commit comments