argocd-notifications icon indicating copy to clipboard operation
argocd-notifications copied to clipboard

Triggers "when" clause with "repo.*" functions always returns false

Open hroyg opened this issue 3 years ago • 0 comments

Summary

we are trying to implement an argocd notifications trigger, we need the "when" condition to trigger when commit message is equal to string e.g "test", i think i am following the documentation (https://argocd-notifications.readthedocs.io/en/stable/triggers/#repo) explanation to get that string through repo.GetCommitMetadata function as follow : when: repo.GetCommitMetadata(app.status.sync.revision).Message == 'test' tried many variations of it but i always returns false

What happened/what you expected to happen? expected to get the commit message back from the function and use that info as part of trigger condition

Diagnostics

What Kubernetes provider are you using? EKS

What version of Argo CD and Argo CD Notifications are you running? argocd: 2.0.3+8d2b13d argocd notifications: v1.0.2

# Paste the logs from the notification controller

# Logs for the entire controller:
kubectl logs -n argocd deployment/argocd-notifications-controller

Message from the maintainers:

Impacted by this bug? Give it a 👍. We prioritise the issues with the most 👍.

hroyg avatar Oct 01 '21 21:10 hroyg