mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-30 11:32:03 +00:00
Merge pull request #55122 from ClickHouse/vdimir/status_comment_link
Add links to check reports in status comment
This commit is contained in:
commit
be9a3cea42
@ -240,9 +240,16 @@ def generate_status_comment(pr_info: PRInfo, statuses: CommitStatuses) -> str:
|
|||||||
hidden_table_rows = [] # type: List[str]
|
hidden_table_rows = [] # type: List[str]
|
||||||
for desc, gs in grouped_statuses.items():
|
for desc, gs in grouped_statuses.items():
|
||||||
state = get_worst_state(gs)
|
state = get_worst_state(gs)
|
||||||
|
state_text = f"{STATUS_ICON_MAP[state]} {state}"
|
||||||
|
# take the first target_url
|
||||||
|
target_url = next(
|
||||||
|
(status.target_url for status in gs if status.target_url), None
|
||||||
|
)
|
||||||
|
if target_url:
|
||||||
|
state_text = f'<a href="{target_url}">{state_text}</a>'
|
||||||
table_row = (
|
table_row = (
|
||||||
f"<tr><td>{desc.name}</td><td>{desc.description}</td>"
|
f"<tr><td>{desc.name}</td><td>{desc.description}</td>"
|
||||||
f"<td>{STATUS_ICON_MAP[state]} {state}</td></tr>\n"
|
f"<td>{state_text}</td></tr>\n"
|
||||||
)
|
)
|
||||||
if state == SUCCESS:
|
if state == SUCCESS:
|
||||||
hidden_table_rows.append(table_row)
|
hidden_table_rows.append(table_row)
|
||||||
|
Loading…
Reference in New Issue
Block a user