You've already forked wakapi-readme-stats
Merge branch 'master' into CodeQL
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
from json import load
|
from json import load
|
||||||
from os.path import join
|
from os.path import join, dirname
|
||||||
from typing import Dict
|
from typing import Dict
|
||||||
|
|
||||||
from manager_environment import EnvironmentManager as EM
|
from manager_environment import EnvironmentManager as EM
|
||||||
@@ -28,7 +28,7 @@ class FileManager:
|
|||||||
|
|
||||||
:param file: Localization file path, related to current file (in sources root).
|
:param file: Localization file path, related to current file (in sources root).
|
||||||
"""
|
"""
|
||||||
with open(join("sources", file), encoding="utf-8") as config_file:
|
with open(join(dirname(__file__), file), encoding="utf-8") as config_file:
|
||||||
data = load(config_file)
|
data = load(config_file)
|
||||||
FileManager._LOCALIZATION = data[EM.LOCALE]
|
FileManager._LOCALIZATION = data[EM.LOCALE]
|
||||||
|
|
||||||
|
|||||||
@@ -138,7 +138,6 @@ class GitHubManager:
|
|||||||
|
|
||||||
if not EM.DEBUG_RUN:
|
if not EM.DEBUG_RUN:
|
||||||
DBM.i("Pushing chart to repo...")
|
DBM.i("Pushing chart to repo...")
|
||||||
chart_path = f"https://raw.githubusercontent.com/{GitHubManager.USER.login}/{GitHubManager.USER.login}/{GitHubManager.branch()}/{chart_path}"
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
contents = GitHubManager.REPO.get_contents(chart_path)
|
contents = GitHubManager.REPO.get_contents(chart_path)
|
||||||
@@ -147,6 +146,8 @@ class GitHubManager:
|
|||||||
except UnknownObjectException:
|
except UnknownObjectException:
|
||||||
GitHubManager.REPO.create_file(chart_path, "Charts Added", data, committer=GitHubManager._get_author())
|
GitHubManager.REPO.create_file(chart_path, "Charts Added", data, committer=GitHubManager._get_author())
|
||||||
DBM.g("Lines of code chart created!")
|
DBM.g("Lines of code chart created!")
|
||||||
|
|
||||||
|
chart_path = f"https://raw.githubusercontent.com/{GitHubManager.USER.login}/{GitHubManager.USER.login}/{GitHubManager.branch()}/{chart_path}"
|
||||||
return f"**{FM.t('Timeline')}**\n\n\n\n"
|
return f"**{FM.t('Timeline')}**\n\n\n\n"
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user