Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

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

Open
hroyg opened this issue Oct 1, 2021 · 0 comments
Open

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

hroyg opened this issue Oct 1, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@hroyg
Copy link

hroyg commented Oct 1, 2021

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 hroyg added the bug Something isn't working label Oct 1, 2021
@hroyg hroyg changed the title triggers when clause with "repo.*" functions always returns false Triggers "when" clause with "repo.*" functions always returns false Oct 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant