Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: yaroslavborbat <[email protected]>
  • Loading branch information
yaroslavborbat committed Dec 12, 2024
1 parent 828c281 commit 23d6e18
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion hooks/moduleconfig_labeler.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,11 @@ def generate_config(self) -> dict:
def reconcile(self) -> Callable[[hook.Context], None]:
def r(ctx: hook.Context):
labels = {}
print("SNAPSHOT:", ctx.snapshot)
if (snaps := ctx.snapshots.get(self.SNAPSHOT_NAME, [])) and len(snaps) > 0:
labels = snaps[0]["filterResult"].get("labels", {})
tmp_labels = snaps[0].get("filterResult", {}).get("labels", {})
if tmp_labels is not None:
labels = tmp_labels

if labels.get(self.LABEL, "") == self.module_name:
return
Expand Down

0 comments on commit 23d6e18

Please sign in to comment.