updated milestone parsing

This commit is contained in:
mjgaughan 2023-10-31 15:53:17 -05:00
parent a0e533f249
commit 3872f65c54
2 changed files with 7 additions and 3 deletions

View File

@ -30,8 +30,11 @@ def parse_milestones(milestones, earliest_date):
for entry in milestones:
#if entry date is more recent than the earliest date we're looking at
# TODO: decide whether to use created_at or updated_at or closed_at
if dt.datetime.fromisoformat(entry['updated_at'][:-1]) > earliest_date:
count_of_milestones += 1
# problem is that no one closes their milestones?! hardly seems representative?!
# making this a note here, as both Tamburri and van Meijel use 'closed_at'
if entry['updated_at'] != None:
if dt.datetime.fromisoformat(entry['updated_at'][:-1]) > earliest_date:
count_of_milestones += 1
return count_of_milestones

View File

@ -17,7 +17,8 @@ def main(vcs_path, begin_date):
# this is the primary function for getting the list of commits from perceval
def get_perceval_log(vcs_path, begin_date):
print(vcs_path)
repo_dir = '/tmp/' + str(vcs_path[0].split('/')[-1]) + ".git"
repo_dir = '/tmp/' + str(vcs_path[0].split('/')[-1])
#gitpath=repo_dir
repo = Git(uri=vcs_path[0], gitpath=repo_dir)
# this is a temporary date_from, will need to be more inclusive in the future
fetched_commits = repo.fetch(from_date=begin_date)