Skip to content

Commit

Permalink
log missing separator and skip header if no matches
Browse files Browse the repository at this point in the history
  • Loading branch information
aliciaaevans committed Nov 19, 2024
1 parent a7f3efc commit 75b2552
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions images/bot/src/bioconda_bot/comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 += "<details><summary>show</summary>Images for Azure are in the LinuxArtifacts zip file above."
Expand Down

0 comments on commit 75b2552

Please sign in to comment.