From 4965c4e84a7f5cb48a437ad20ba2c967b034ac0d Mon Sep 17 00:00:00 2001 From: Pierre Kancir Date: Thu, 24 Sep 2026 10:17:24 +0200 Subject: [PATCH] .github: shorten board name on size table comment counter part of https://github.com/ArduPilot/ardupilot/pull/34469 --- .github/workflows/test_size_comment.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_size_comment.yml b/.github/workflows/test_size_comment.yml index 283aef88f26..be774fb43d8 100644 --- a/.github/workflows/test_size_comment.yml +++ b/.github/workflows/test_size_comment.yml @@ -148,6 +148,9 @@ jobs: # table for the run's own page COLUMNS = ["AP_Periph", "antennatracker", "blimp", "bootloader", "copter", "heli", "iofirmware", "plane", "rover", "sub"] + # header only; the json is keyed by the names above + COLUMN_TITLES = {"AP_Periph": "Periph", "antennatracker": "tracker", + "iofirmware": "iofw"} # no dot, colon, bracket, angle or at, so a name cannot render as a # link, an image or a mention BOARD_RE = re.compile(r"[A-Za-z0-9][A-Za-z0-9_+-]{0,39}") @@ -258,7 +261,8 @@ jobs: elif head: lines += ["Built from %s" % head, ""] if rows: - lines += ["| " + " | ".join(["Board"] + COLUMNS) + " |", + titles = [COLUMN_TITLES.get(column, column) for column in COLUMNS] + lines += ["| " + " | ".join(["Board"] + titles) + " |", "| " + " | ".join([":---"] + [":---:"] * len(COLUMNS)) + " |"] for row in rows: lines.append("| " + " | ".join(row) + " |")