Skip to content

Draft: Emit some issue events to AutoFlow

Timo Furrer requested to merge autoflow/issue-created-event into master

What does this MR do and why?

This change set introduces some new events for issues:

  • created
  • updated
  • closed
  • reopened

They are based on the EventStore.

The events come with associated workers to forward those events to AutoFlow as part of AutoFlow PoC: configurable automation for issue... (&12571).

We will most definitely have to adjust the worker configurations to meet AutoFlows requirements - once properly specified.

Refs Add more triggers for autoflow (#443486)

Testing

def output_event_data(w, ev):
    print("Handling test event: " + ev["type"] + " with data: " + str(ev["data"]))

on_event(
    type="com.gitlab.events.issue_created",
    handler=output_event_data,
)

on_event(
    type="com.gitlab.events.issue_updated",
    handler=output_event_data,
)

on_event(
    type="com.gitlab.events.issue_closed",
    handler=output_event_data,
)

on_event(
    type="com.gitlab.events.issue_reopened",
    handler=output_event_data,
)
  • Create, Update, Close and Reopen an issue in that project
  • Verify KAS output that you see the prints from the output_event_data handler of the Flow script.
Edited by Timo Furrer

Merge request reports

Loading