In the current version of the script we have functions where we need to specify the type of the repository we are working on.
Either it's github or mercurial and there are cases where this can be automated by checking the parent JSON type and avoid things like:
for element in list:
if (which_repo == "complete" or which_repo == "Git") and element[2] == "git":
extract_json_from_git(element[1], days_to_generate)
LOGGER.info("GIT %s Repository: %s", successfully_generated, element[1])
if (which_repo == "complete" or which_repo == "Hg") and element[2] == "hg":
extract_json_from_hg(element[1], days_to_generate)
LOGGER.info("HG %s Repository: %s", successfully_generated, element[1])
if which_repo != "complete" and which_repo != "Git" and which_repo != "Hg":
LOGGER.error("No {} table was generated!".format(element[2]))
In the current version of the script we have functions where we need to specify the type of the repository we are working on. Either it's github or mercurial and there are cases where this can be automated by checking the parent JSON type and avoid things like:
or