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

feat: include filters in trigger condition #1307

Closed
Hunter-Thompson opened this issue Aug 11, 2021 · 1 comment
Closed

feat: include filters in trigger condition #1307

Hunter-Thompson opened this issue Aug 11, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@Hunter-Thompson
Copy link

Hunter-Thompson commented Aug 11, 2021

Is your feature request related to a problem? Please describe.

We can run a certain workflow based on a trigger condition, which is tied to an event.

  dependencies:
    - name: dep01
      eventSourceName: webhook-a
      eventName: example01
    - template:
        conditions: "dep01"
        name: trigger01
        http:
          url: http://abc.com/hello1
          method: GET

But we cannot run a certain workflow based on a single filter. All filters need to pass for the workflows to run, which is a desired effect most of the time, but this does now allow us to run a certain workflow only when a certain filter has been matched.

Having filters in trigger dependencies would help in creating sensors that can trigger specific workflows based on filter data.

Describe the solution you'd like

filters:
  - name: f01 	
    data:
      - path: body.value
        type: string
	    value:
	    	- "hello world"

dependencies:
	- name: dep01
	    eventSourceName: webhook-a
	    eventName: example01
    - template:
       conditions: "dep01 && f01"
       name: trigger01
       http:
         url: http://abc.com/hello1
         method: GET

Adding names to filters, and then using them in trigger conditions could allow this?

Describe alternatives you've considered

An alternative would be to create a new sensor with a different filter per repo.

Use case

If 2 repos use the same event and sensor, but one of them requires a privileged workflow to be ran, the only way to work around this is to create a new sensor.


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.

@Hunter-Thompson Hunter-Thompson added the enhancement New feature or request label Aug 11, 2021
@Hunter-Thompson
Copy link
Author

My bad, this is already a possibility, since filters are a part of dependencies. Sorry!

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

No branches or pull requests

1 participant