1
|
|
|
# -*- coding: utf-8 -*- |
2
|
|
|
# Copyright (C) 2012 Anaconda, Inc |
3
|
|
|
# SPDX-License-Identifier: BSD-3-Clause |
4
|
|
|
from __future__ import absolute_import, division, print_function, unicode_literals |
5
|
|
|
|
6
|
|
|
from subprocess import check_output |
7
|
|
|
|
8
|
|
|
|
9
|
|
|
contributors = sorted(set(x.strip('"') for x in check_output( |
10
|
|
|
['git', 'log', '--format="%aN <%aE>"'] |
11
|
|
|
).decode("utf-8").splitlines())) |
12
|
|
|
|
13
|
|
|
|
14
|
|
|
with open('.cla-signers') as fh: |
15
|
|
|
github_map_lines = fh.read().strip().split('\n') |
16
|
|
|
|
17
|
|
|
|
18
|
|
|
def get_cla_signers(): |
19
|
|
|
with open('.cla-signers') as fh: |
20
|
|
|
for line in fh: |
21
|
|
|
line = line.strip() |
22
|
|
|
if line.startswith('#') or not line: |
23
|
|
|
continue |
24
|
|
|
yield line |
25
|
|
|
|
26
|
|
|
|
27
|
|
|
signers_map = {} |
28
|
|
|
|
29
|
|
|
|
30
|
|
|
for line in get_cla_signers(): |
31
|
|
|
username, contributor_name, _ = line.split('|') |
32
|
|
|
username = username.strip() |
33
|
|
|
contributor_name = contributor_name.strip() |
34
|
|
|
if username: |
35
|
|
|
signers_map[contributor_name] = username |
36
|
|
|
|
37
|
|
|
|
38
|
|
|
def get_github_map_line(): |
39
|
|
|
with open('.github-map') as fh: |
40
|
|
|
for line in fh: |
41
|
|
|
line = line.strip() |
42
|
|
|
if line.startswith('#') or not line: |
43
|
|
|
continue |
44
|
|
|
github_username, git_id = line.split('|') |
45
|
|
|
yield git_id.strip(), github_username.strip() |
46
|
|
|
|
47
|
|
|
|
48
|
|
|
github_username_map = dict(x for x in get_github_map_line()) |
49
|
|
|
|
50
|
|
|
sent = [ |
51
|
|
|
"alanhdu", |
52
|
|
|
"arkottke", |
53
|
|
|
"almarklein", |
54
|
|
|
"groutr", |
55
|
|
|
"delicb", |
56
|
|
|
"chrislf", |
57
|
|
|
"dan-blanchard", |
58
|
|
|
"Horta", |
59
|
|
|
"dhirschfeld", |
60
|
|
|
"dfroger", |
61
|
|
|
"dawehner", |
62
|
|
|
"dedalusj", |
63
|
|
|
"e-gillies-ix", |
64
|
|
|
"3kwa", |
65
|
|
|
"faph", |
66
|
|
|
"flaviomartins", |
67
|
|
|
"aldanor", |
68
|
|
|
"jacoblsmith", |
69
|
|
|
"jrovegno", |
70
|
|
|
"jbcrail", |
71
|
|
|
"jerowe", |
72
|
|
|
"kdeldycke", |
73
|
|
|
"Korijn", |
74
|
|
|
"mikecroucher", |
75
|
|
|
"blindgaenger", |
76
|
|
|
"mdengler", |
77
|
|
|
"melund", |
78
|
|
|
"megies", |
79
|
|
|
"mheilman", |
80
|
|
|
"elehcim", |
81
|
|
|
"mika-fischer", |
82
|
|
|
"natefoo", |
83
|
|
|
"nickeubank", |
84
|
|
|
"rcthomas", |
85
|
|
|
"remram44", |
86
|
|
|
"rleecivis", |
87
|
|
|
"tdhopper", |
88
|
|
|
"twiecki", |
89
|
|
|
"tpn", |
90
|
|
|
"ukoethe", |
91
|
|
|
"esc", |
92
|
|
|
"NewbiZ", |
93
|
|
|
"wojdyr", |
94
|
|
|
"wulmer", |
95
|
|
|
] |
96
|
|
|
|
97
|
|
|
|
98
|
|
|
for contributor in contributors: |
99
|
|
|
if contributor not in signers_map: |
100
|
|
|
github_username = github_username_map[contributor] |
101
|
|
|
if github_username not in sent: |
102
|
|
|
print(contributor) |
103
|
|
|
|