turbo icon indicating copy to clipboard operation
turbo copied to clipboard

Emit pipeline events to javascript callback functions

Open robaca opened this issue 1 year ago • 1 comments

Describe the feature you'd like to request

We want to perform some actions whenever a task is started, finished or has failed. Concretely, we want to send some REST requests to GitHub to update PR action statuses.

Describe the solution you'd like

Add an option to turbo.json referencing a javascript module via a path relative to the repository root. This module should export one or more callback functions that are called on all these events and may return promises if doing async stuff.

Events should be emitted least on global (pipeline starts/ends (succeeding or failing)) and on task level, parameterized with pipeline and task metadata.

Describe alternatives you've considered

Wrapping the commands we trigger in our package scripts.

robaca avatar Sep 21 '22 11:09 robaca

I think the plan is to use the turbo daemon to allow to script Turborepo

weyert avatar Sep 21 '22 14:09 weyert