@@ -265,8 +265,22 @@ def generate_version_pandas_tables(repo, data_root_dir, check_for_updates=True):
265
265
pd_commits .loc [pd_commits .commit_sha == row .commit_sha , 'author' ] = author_id
266
266
pd_commits .loc [pd_commits .commit_sha == row .commit_sha , 'committer' ] = committer_id
267
267
if (author_id is None ) and (committer_id is None ):
268
- pd_commits .loc [pd_commits .commit_sha == row .commit_sha , 'unknown_user' ] = row .committer_name
269
-
268
+ users = Utility .get_users (data_root_dir )
269
+ found = False
270
+ if "alias" in users :
271
+ for index2 , row2 in users .iterrows ():
272
+ if not pd .isnull (row2 ["alias" ]) and row2 ["alias" ] is not None :
273
+ all_alias = row2 ["alias" ].split (';' )
274
+ for alias in all_alias :
275
+ if commiter_name == alias :
276
+ pd_commits .loc [pd_commits .commit_sha == row .commit_sha , 'author' ] = row2 ["anonym_uuid" ]
277
+ pd_commits .loc [pd_commits .commit_sha == row .commit_sha , 'committer' ] = row2 ["anonym_uuid" ]
278
+ found = True
279
+ break
280
+ if found :
281
+ break
282
+ if not found :
283
+ pd_commits .loc [pd_commits .commit_sha == row .commit_sha , 'unknown_user' ] = row .committer_name
270
284
else :
271
285
commit_sha = pd_commits [pd_commits .committer_name == commiter_name ].iloc [0 ].commit_sha
272
286
author_id = Utility .extract_author_data_from_commit (repo , commit_sha ,
@@ -276,7 +290,22 @@ def generate_version_pandas_tables(repo, data_root_dir, check_for_updates=True):
276
290
pd_commits .loc [pd_commits .committer_name == commiter_name , 'author' ] = author_id
277
291
pd_commits .loc [pd_commits .committer_name == commiter_name , 'committer' ] = committer_id
278
292
if (author_id is None ) and (committer_id is None ):
279
- pd_commits .loc [pd_commits .committer_name == commiter_name , 'unknown_user' ] = commiter_name
293
+ users = Utility .get_users (data_root_dir )
294
+ found = False
295
+ if "alias" in users :
296
+ for index , row in users .iterrows ():
297
+ if not pd .isnull (row ["alias" ]) and row ["alias" ] is not None :
298
+ all_alias = row ["alias" ].split (';' )
299
+ for alias in all_alias :
300
+ if commiter_name == alias :
301
+ pd_commits .loc [pd_commits .committer_name == commiter_name , 'author' ] = row ["anonym_uuid" ]
302
+ pd_commits .loc [pd_commits .committer_name == commiter_name , 'committer' ] = row ["anonym_uuid" ]
303
+ found = True
304
+ break
305
+ if found :
306
+ break
307
+ if not found :
308
+ pd_commits .loc [pd_commits .committer_name == commiter_name , 'unknown_user' ] = commiter_name
280
309
pd_commits .drop (['committer_name' ], axis = 1 , inplace = True )
281
310
282
311
users = Utility .get_users (data_root_dir )
0 commit comments