[FIX] runbot_merge: don't show details of merged PR on GH

Detailed statuses are useful in the actual PR dashboard as that allows
direct access to the builds, however in the PR where it's only a
picture it's useless, so fold that information. Also fold it when a PR
is staged.

And while at it add a note / sub-title that the PR is staged.

Fixes #919
This commit is contained in:
Xavier Morel 2024-08-05 15:18:19 +02:00
parent ff6f046811
commit 52f2b1e381

View File

@ -355,7 +355,14 @@ def render_full_table(pr, branches, repos, batches):
for p in ps['prs']:
pr = p['pr']
attached = attached and p['attached']
sub = ": staging failed" if pr.error else ""
if pr.staging_id:
sub = ": is staged"
elif pr.error:
sub = ": staging failed"
else:
sub = ""
lines = [
Line([Text(
f"#{p['number']}{sub}",
@ -366,7 +373,7 @@ def render_full_table(pr, branches, repos, batches):
]
# no need for details if closed or in error
if not (p['closed'] or pr.error):
if pr.state not in ('merged', 'closed', 'error') and not pr.staging_id:
if pr.draft:
lines.append(Line([boxes[False], Text("is in draft", font, error)]))
lines.extend([