From 75b25520e06b3270a7f50c50b82824e4bda07a1c Mon Sep 17 00:00:00 2001 From: aliciaaevans Date: Tue, 19 Nov 2024 11:37:40 -0500 Subject: [PATCH] log missing separator and skip header if no matches --- images/bot/src/bioconda_bot/comment.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/images/bot/src/bioconda_bot/comment.py b/images/bot/src/bioconda_bot/comment.py index d6b8718..85ee783 100644 --- a/images/bot/src/bioconda_bot/comment.py +++ b/images/bot/src/bioconda_bot/comment.py @@ -53,14 +53,15 @@ async def make_artifact_comment(session: ClientSession, pr: int, sha: str) -> No for URL, artifact in artifacts: if artifact.endswith(".tar.gz"): image_name = artifact.split("/").pop()[: -len(".tar.gz")] - comment += imageHeader - imageHeader = "" # only add the header for the first image if ':' in image_name: package_name, tag = image_name.split(':', 1) elif '---' in image_name: package_name, tag = image_name.split('---', 1) else: + log(f"Skipping image {image_name}: missing separator") continue + comment += imageHeader + imageHeader = "" # only add the header for the first image if ci_platform == "azure": comment += f"{package_name} | {tag} | Azure | " comment += "
showImages for Azure are in the LinuxArtifacts zip file above."