Using variable for heading instead

This commit is contained in:
Dwi Siswanto
2021-07-20 14:57:07 +07:00
parent 3dfccad5f1
commit 6d315e62b5

View File

@@ -9,8 +9,9 @@ def command(args, start=None, end=None):
return "\n".join(subprocess.run(args, text=True, capture_output=True).stdout.split("\n")[start:end])[:-1]
def get_top10():
HEADER = "## Top 10 Contributors\n\n"
TOP10 = command(["cat", "TOP-10.md"])
return "## Top 10 Contributors\n\n" + TOP10 if len(TOP10) > 0 else ""
return HEADER + TOP10 if len(TOP10) > 0 else ""
if __name__ == "__main__":
version = command(["git", "describe", "--tags", "--abbrev=0"])