Open Rooba opened 7 months ago
In the docs --
Due to a issue^1 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
Due to a issue^1 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
can't you write a regex for the tags criteria?
In the docs --
I would think the following would be a fairly simple way to get around that issue
or even something like