Skip to content

Commit 4f9b810

Browse files
authored
Filter out builds tagged into regular tags (not sidetags) (#112)
2 parents a20eaa1 + 51f2a05 commit 4f9b810

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

packit_service_fedmsg/callbacks.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,14 @@ def _copr(topic: str, event: dict, packit_user: str) -> CallbackResult:
4848

4949
def _koji(topic: str, event: dict, packit_user: str) -> CallbackResult:
5050
if "buildsys.tag" in topic:
51-
what = f"[Koji] build:{event.get('build_id')} tag:{event.get('tag_name')}"
51+
if "-side-" not in event.get("tag"):
52+
# consider only tagging into sidetags
53+
return CallbackResult(
54+
msg="[Koji] Koji build not tagged into a sidetag.",
55+
pass_to_service=False,
56+
)
57+
58+
what = f"[Koji] build:{event.get('build_id')} tag:{event.get('tag')}"
5259
return CallbackResult(msg=what)
5360

5461
if "buildsys.build.state" in topic:

0 commit comments

Comments
 (0)