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

  1. Create a DynamicTrigger with the onIssueOpened event.
  2. Loop through all of your repos add them to it.
  3. Use an onNewRepository trigger and add them to the DynamicTrigger.