diff --git a/commands/comments.py b/commands/comments.py index 67c1aa3..6596cd4 100644 --- a/commands/comments.py +++ b/commands/comments.py @@ -51,17 +51,19 @@ class Comments(BaseCommand): for file_path in comments[author]: if file_path is not None: - print(f"# `{file_path.split('/')[-1]}`") + filename = file_path.split('/')[-1] + print(f"\n`{filename}`\n{'-'*(len(filename) + 2)}") for comment in comments[author][file_path]: if comment["system"]: continue if comment["type"] == "DiffNote": body = comment["body"].replace( - "\n", "\n" + " " * (Comments.width + 2) + "\n", "\n" + " " * (len(str(comment["position"]["new_line"])) + 5) ) + print( - f"""{f'L{comment["position"]["new_line"]}':>{Comments.width}}: {body}""" + f"""- L{comment["position"]["new_line"]}: {body}""" ) else: print(f"""[{comment["created_at"]}]\n{comment["body"]}""")