Skip to content

Commit 84c908c

Browse files
committed
feat: ignore PR artifacts
1 parent 73755dc commit 84c908c

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

stack_scanner/main.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import datetime
22
import os
3+
import re
34
import shutil
45
import subprocess
56
import sys
@@ -85,7 +86,11 @@ def get_harbor_recent_tags(project: str, repository: str) -> list[str] | None:
8586
break
8687

8788
for artifact in artifacts:
88-
artifact_tags = [tag["name"] for tag in (artifact.get("tags") or [])]
89+
artifact_tags = [
90+
tag["name"]
91+
for tag in (artifact.get("tags") or [])
92+
if not re.search(r"-pr\d+", tag["name"])
93+
]
8994
if not artifact_tags:
9095
continue
9196

0 commit comments

Comments
 (0)