refine description strings
This commit is contained in:
@@ -9,6 +9,7 @@ LIMIT_COMMITS_30_DAYS = 50
|
||||
LIMIT_STARS = 200
|
||||
LIMIT_NLOC = 100000
|
||||
MARGIN = 0.1
|
||||
CLONE_DIR = "~/temp/PICable"
|
||||
|
||||
|
||||
def get_stars_info(owner, repo, token):
|
||||
@@ -41,14 +42,13 @@ def get_commits_last_30_days(owner, repo, token):
|
||||
if last_commits_response.status_code != 200:
|
||||
return -1
|
||||
|
||||
print((page_count - 1) * 30 + len(last_commits_response.json()))
|
||||
return (page_count - 1) * 30 + len(last_commits_response.json())
|
||||
return len(commits_response.json())
|
||||
|
||||
|
||||
def get_lines_of_code(owner, repo):
|
||||
repo_url = f"https://github.com/{owner}/{repo}.git"
|
||||
clone_dir = os.path.expanduser(f"~/temp/PICable/{repo}")
|
||||
clone_dir = os.path.expanduser(f"{CLONE_DIR}/{repo}")
|
||||
|
||||
try:
|
||||
subprocess.run(["git", "clone", repo_url, clone_dir], check=True, stdout=sys.stdout, stderr=sys.stderr)
|
||||
@@ -63,7 +63,6 @@ def get_lines_of_code(owner, repo):
|
||||
else:
|
||||
loc = 0
|
||||
subprocess.run(["rm", "-rf", clone_dir], check=True)
|
||||
print()
|
||||
return loc
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user