You've already forked wakapi-readme-stats
graph height fixed, local yearly data caching added
This commit is contained in:
@@ -106,7 +106,7 @@ class GitHubManager:
|
||||
return False
|
||||
|
||||
@staticmethod
|
||||
def set_github_output(stats: str):
|
||||
def set_github_output(stats: str) -> bool:
|
||||
"""
|
||||
Outputs readme data as current action output instead of committing it.
|
||||
|
||||
@@ -114,13 +114,15 @@ class GitHubManager:
|
||||
"""
|
||||
DBM.i("Setting README contents as action output...")
|
||||
if "GITHUB_OUTPUT" not in environ.keys():
|
||||
raise Exception("Not in GitHub environment ('GITHUB_OUTPUT' not defined)!")
|
||||
DBM.p("Not in GitHub environment, not setting action output!")
|
||||
return False
|
||||
|
||||
prefix = "README stats current output:"
|
||||
eol = "".join(choice(ascii_letters) for _ in range(10))
|
||||
FM.write_file(environ["GITHUB_OUTPUT"], f"README_CONTENT<<{eol}\n{prefix}\n\n{stats}\n{eol}\n", append=True)
|
||||
|
||||
DBM.g("Action output set!")
|
||||
return True
|
||||
|
||||
@staticmethod
|
||||
def update_chart(chart_path: str) -> str:
|
||||
|
||||
Reference in New Issue
Block a user