argo-events icon indicating copy to clipboard operation
argo-events copied to clipboard

Documentation: Parse headers in Sensor crd

Open dzirg44 opened this issue 4 years ago • 1 comments

Is your feature request related to a problem? Please describe. according to the https://argoproj.github.io/argo-events/setup/github/ we have 2 data section, body and headers, i am able to use body, but it is not so clear for me how to extract headers.

Describe the solution you'd like

        data:
          - path: header
            type: string
            comparator: "="
            value:
                  - "X-github-event: push"
          # or something like
          - path: header.x-github-event
            type: string
            comparator: "="
            value:
                  - "X-github-event: push"
          - path: body.ref
            type: string
            comparator: "="
            value:
                  - "main"

maybe i missed something in the documentation)


Message from the maintainers:

If you wish to see this enhancement implemented please add a 👍 reaction to this issue! We often sort issues this way to know what to prioritize.

dzirg44 avatar Jan 23 '21 13:01 dzirg44

You can use headers.xxx to do filtering. See the data structure https://github.com/argoproj/argo-events/blob/master/docs/eventsources/setup/github.md#event-structure.

whynowy avatar Mar 25 '21 21:03 whynowy