10
10
import shutil
11
11
import subprocess
12
12
import sys
13
- from typing import Dict , List
13
+ from typing import Dict , List , Optional
14
14
from urllib .parse import urlparse
15
15
16
16
import requests
@@ -286,14 +286,15 @@ def create_commits(
286
286
287
287
# TODO: problem -> twins can be merge commits, same commits for different branches, not only security related fixes
288
288
289
- return self .parse_git_output (out , find_twins )
289
+ return self .parse_git_output (out , find_twins , ancestors_of )
290
290
291
291
except Exception :
292
292
logger .error ("Git command failed, cannot get commits" , exc_info = True )
293
293
return dict ()
294
294
295
- def parse_git_output (self , raw : List [str ], find_twins : bool = False ):
296
-
295
+ def parse_git_output (
296
+ self , raw : List [str ], find_twins : bool = False , next_tag : Optional [str ] = None
297
+ ):
297
298
commits : Dict [str , RawCommit ] = dict ()
298
299
commit = None
299
300
sector = 0
@@ -303,6 +304,8 @@ def parse_git_output(self, raw: List[str], find_twins: bool = False):
303
304
sector = 1
304
305
if 0 < len (commit .changed_files ) < 100 :
305
306
commit .msg = commit .msg .strip ()
307
+ # TODO: should work here
308
+ # commit.set_tags(next_tag)
306
309
if find_twins :
307
310
commit .minhash = get_encoded_minhash (commit .msg [:50 ])
308
311
0 commit comments