def Git2Json(path=""): AllFilesContent = [] contents = repo.get_contents(path) while contents: content = contents.pop(0) if '/assets/' not in content.url: if content.type == "dir": contents.extend(repo.get_contents(content.path)) else: AllFilesContent.append(getGitFileContent(content)) utils.saveasJson(AllFilesContent, "GitDump.json")
def Git2Json(path=""): AllFilesContent = [] contents = repo.get_contents(path) while contents: content = contents.pop(0) # print("fetching " + content.path) if '/assets/' not in content.url: if content.type == "dir": contents.extend(repo.get_contents(content.path)) else: gitFileContent = getGitFileContent(content) if gitFileContent: AllFilesContent.append(gitFileContent) utils.saveasJson(AllFilesContent, "/tmp/GitDump.json")