-
-
Notifications
You must be signed in to change notification settings - Fork 563
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c85e7da
commit 3c77319
Showing
2 changed files
with
102 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -378,7 +378,7 @@ def generate_language_per_repo(result): | |
"percent": percent | ||
}) | ||
|
||
title = translate['I Mostly Code in'] + ' ' + most_language_repo | ||
title = translate['I Mostly Code in'] % most_language_repo | ||
return '**' + title + '** \n\n' + '```text\n' + make_list(data) + '\n\n```\n' | ||
|
||
|
||
|
@@ -411,10 +411,9 @@ def get_short_info(github): | |
data = request.json() | ||
total = data['years'][0]['total'] | ||
year = data['years'][0]['year'] | ||
string += '> 🏆 ' + humanize.intcomma(total) + " " + translate[ | ||
'Contributions in the year'] + " " + year + '\n > \n' | ||
string += '> 🏆 ' + translate['Contributions in the year'] % (humanize.intcomma(total), year) + '\n > \n' | ||
|
||
string += '> 📦 ' + disk_usage + " " + translate["Used in GitHub's Storage"] + ' \n > \n' | ||
string += '> 📦 ' + translate["Used in GitHub's Storage"] % disk_usage + ' \n > \n' | ||
is_hireable = user_info.hireable | ||
public_repo = user_info.public_repos | ||
private_repo = user_info.owned_private_repos | ||
|
@@ -425,12 +424,10 @@ def get_short_info(github): | |
else: | ||
string += "> 🚫 " + translate["Not Opted to Hire"] + "\n > \n" | ||
|
||
string += '> 📜 ' + str(public_repo) + " " | ||
string += translate['public repositories'] + '\n > \n' if public_repo > 1 else translate[ | ||
'public repository'] + ' \n > \n' | ||
string += '> 🔑 ' + str(private_repo) + " " | ||
string += translate['private repositories'] + ' \n\n' if private_repo > 1 else translate[ | ||
'private repository'] + ' \n > \n' | ||
string += '> 📜 ' + translate['public repositories'] % public_repo + " " + '\n > \n' if public_repo > 1 else translate[ | ||
'public repository'] % public_repo + ' \n > \n' | ||
string += '> 🔑 ' + translate['private repositories'] % private_repo + " " +' \n\n' if private_repo > 1 else translate[ | ||
'private repository'] % public_repo + ' \n > \n' | ||
|
||
return string | ||
|
||
|
@@ -511,11 +508,11 @@ def generate_new_readme(stats: str, readme: str): | |
committer = InputGitAuthor('readme-bot', '[email protected]') | ||
if new_readme != rdmd: | ||
try: | ||
repo.update_file(path=contents.path, message='Updated with Dev Metrics', | ||
repo.update_file(path=contents.path+"."+locale, message='Updated with Dev Metrics', | ||
content=new_readme, sha=contents.sha, branch='master', | ||
committer=committer) | ||
except: | ||
repo.update_file(path=contents.path, message='Updated with Dev Metrics', | ||
repo.update_file(path=contents.path+"."+locale, message='Updated with Dev Metrics', | ||
content=new_readme, sha=contents.sha, branch='main', | ||
committer=committer) | ||
print("Readme updated") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters