In the docs --
Due to a issue12 in PyYAML, criteria keys must be unique. This sometimes becomes relevant when you want to apply different operators (like contains and ncontains) to the same trigger data:
criteria:
trigger.payload.commit.tags: # duplicate key - ignored!
type: ncontains
pattern: StackStorm
trigger.payload.commit.tags: # duplicate key - evaluated
type: contains
pattern: pull request
trigger.payload.commit.message: # unique key - evaluated
type: ncontains
pattern: ST2
I would think the following would be a fairly simple way to get around that issue
criteria:
- trigger.payload.commit.tags:
type: ncontains
pattern: StackStorm
- trigger.payload.commit.tags:
type: contains
pattern: pull request
- trigger.payload.commit.message:
type: ncontains
pattern: ST2
or even something like
criteria:
- trigger: payload.commit.tags
type: ncontains
pattern: StackStorm
- trigger: payload.commit.tags
type: contains
pattern: pull request
- trigger: payload.commit.message
type: ncontains
pattern: ST2
In the docs --
I would think the following would be a fairly simple way to get around that issue
or even something like
Footnotes
https://github.com/yaml/pyyaml/issues/41 ↩
https://github.com/yaml/pyyaml/issues/165 ↩