DynamicTrigger
DynamicTrigger: Overview
DynamicTrigger
allows you to define a trigger that can be configured dynamically at runtime.
Sometimes you want to subscribe to a webhook but you donβt know the exact configuration until runtime.
Constructor
DynamicTrigger()
Creates a new DynamicTrigger
instance. You should use the TriggerClient.defineDynamicTrigger
method instead of calling this directly.
Instance methods
register()
Use this method to register a new schedule with the DynamicTrigger.
unregister()
Use this method to unregister a schedule from the DynamicTrigger, using the id you used when registering it.
Example use cases:
Subscribe to new GitHub issues for all your repos
- Create a
DynamicTrigger
with the onIssueOpened event. - Loop through all of your repos add them to it.
- Use an onNewRepository trigger and add them to the
DynamicTrigger
.
Was this page helpful?