Skip to content

Commit 75b2552

Browse files
committed
log missing separator and skip header if no matches
1 parent a7f3efc commit 75b2552

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

images/bot/src/bioconda_bot/comment.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,15 @@ async def make_artifact_comment(session: ClientSession, pr: int, sha: str) -> No
5353
for URL, artifact in artifacts:
5454
if artifact.endswith(".tar.gz"):
5555
image_name = artifact.split("/").pop()[: -len(".tar.gz")]
56-
comment += imageHeader
57-
imageHeader = "" # only add the header for the first image
5856
if ':' in image_name:
5957
package_name, tag = image_name.split(':', 1)
6058
elif '---' in image_name:
6159
package_name, tag = image_name.split('---', 1)
6260
else:
61+
log(f"Skipping image {image_name}: missing separator")
6362
continue
63+
comment += imageHeader
64+
imageHeader = "" # only add the header for the first image
6465
if ci_platform == "azure":
6566
comment += f"{package_name} | {tag} | Azure | "
6667
comment += "<details><summary>show</summary>Images for Azure are in the LinuxArtifacts zip file above."

0 commit comments

Comments
 (0)