microsoft / azure-pipelines-yaml

Azure Pipelines YAML examples, templates, and community interaction
MIT License
1.19k stars 924 forks source link

Resource webhook filters with paths which contain special keys. #579

Open cokeSchlumpf opened 1 year ago

cokeSchlumpf commented 1 year ago

Hi everyone,

I have detected a potential issue with the webhok filters. We have an incomming JSON which contains keys with dots. Example:

{
  "resource": {
    "fields": {
      "System.State": "Something"
    }
  }
}

There is no chance that the suggested notation of the filter could work, e.g.,

resources:
  webhooks:
    - webhook: webhook_name
      connection: connection_name
      filters:
        - path: resource.fields.System.State
          value: Ready to Deploy UAT

I tried the bracket notation, but without success:

resources:
  webhooks:
    - webhook: webhook_name
      connection: connection_name
      filters:
        - path: resource.fields["System.State"]
          value: Ready to Deploy UAT

Is there any way to get this working?

KonstantinTyukalov commented 1 year ago

Hi @cokeSchlumpf, thank you for the information provided! Let us check once we've dealt with higher priority tickets