Update comment formatting
This commit is contained in:
parent
35ca777f67
commit
4437e1a058
1 changed files with 7 additions and 5 deletions
|
@ -31,7 +31,8 @@ class Comments(BaseCommand):
|
|||
|
||||
for author in comments:
|
||||
login, name = author
|
||||
print(f"***** {name} ({login}) *****")
|
||||
header = f"***** {name} ({login}) *****".center(40, "*").center(80)
|
||||
print(header)
|
||||
|
||||
for comment in comments[author]:
|
||||
if comment["system"]:
|
||||
|
@ -46,8 +47,7 @@ class Comments(BaseCommand):
|
|||
)
|
||||
else:
|
||||
print(f"""[{comment["created_at"]}]\n{comment["body"]}""")
|
||||
print()
|
||||
print()
|
||||
print(header)
|
||||
|
||||
def exec(self, submission: Submission) -> None:
|
||||
mrs = get_mrs_for_branch(submission.branch)
|
||||
|
@ -57,6 +57,8 @@ class Comments(BaseCommand):
|
|||
iid = mrs[0]["iid"]
|
||||
comments = get_comments(iid)
|
||||
|
||||
print(f"### {submission.branch.center(20)} ###")
|
||||
branch = f"### {submission.branch.center(20)} ###".upper().center(80, "#")
|
||||
|
||||
print(branch)
|
||||
self.print_comments(comments)
|
||||
print(f"### {submission.branch.center(20)} ###")
|
||||
print(branch)
|
||||
|
|
Reference in a new issue