Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

total-contributions: Clone repositories if already available.

Tim Abbott13da2c2fb75e
diff --git a/tools/total-contributions b/tools/total-contributions
index 0fa25df7c02..0c133022cc0 100755
--- a/tools/total-contributions
+++ b/tools/total-contributions
@@ -154,6 +154,12 @@ for (full_repository, branch) in [
]:
repository = os.path.basename(full_repository)
+ if not os.path.exists(find_path(repository)):
+ subprocess.check_call(
+ ["git", "clone", f"[email protected]:{full_repository}.git"],
+ cwd=os.path.dirname(find_path(repository)),
+ )
+
subprocess.check_call(["git", "fetch"], cwd=find_path(repository))
lower_repo_version = find_last_commit_before_time(repository, branch, lower_time)
upper_repo_version = find_last_commit_before_time(repository, branch, upper_time)