diff --git a/github_api_req.py b/github_api_req.py index 0591f23..623b941 100644 --- a/github_api_req.py +++ b/github_api_req.py @@ -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 diff --git a/perceval_tasks.py b/perceval_tasks.py index b57000a..05d3b99 100644 --- a/perceval_tasks.py +++ b/perceval_tasks.py @@ -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)