Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If my boolean value is not quoted, will it be matched #654

Closed
foursunZero opened this issue Aug 31, 2023 · 1 comment
Closed

If my boolean value is not quoted, will it be matched #654

foursunZero opened this issue Aug 31, 2023 · 1 comment
Labels

Comments

@foursunZero
Copy link

foursunZero commented Aug 31, 2023

My json as follows

  "annotations": {},
  "is_recovered": true,
  "notify_users_obj": [],
  "username": "test"

and can it work if my webhook config as follows

[
  {
    "id": "4444",
    "execute-command": "/opt/webhook/scripts/test/test4.sh",
    "command-working-directory": "/opt/webhook/",
    "pass-arguments-to-command": [
      {
        "source": "payload",
        "name": "annotations"
      }
    ],
    "trigger-rule": {
      "match": {
        "type": "value",
        "value": "true",
        "parameter": {
          "source": "payload",
          "name": "is_recovered"
        }
      }
    }
  }
]

@moorereason
Copy link
Collaborator

In the trigger definition, don't quote "true" so that it's treated as a boolean and not a string.

"value": true,

Does that work for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants