Draft: Add ProjectAutomationHook to run Automations reactively
What does this MR do and why?
As discussed in gitlab-org/incubation-engineering/no-code-low-code/meta#26 (moved), this MR introduces the ProjectAutomationHook
that piggybacks on the WebHook
's event subscription for triggering Automations. The actual job execution is to be added in the subsequent MRs.
The current solution aims to reuse the existing capability to kick off the iteration of the Automation MVC (incubation project), with the longterm plan to migrate over to CI Workflow's event architecture when it's ready.
Pending tasks
-
Initial review by the SMEs to confirm the direction -
Complete unit tests -
Link todo to issues
How to set up and validate locally
- In Rails console, create a new automation hook for a given project, e.g.
Project.first.automation_hooks.create!(url: "file://.gitlab/automations/issue_resolver.yml")
-
tail
the application log.tail -f log/application.log
- Create or update an issue on the project
- Check the log message similar to:
2023-01-16T08:51:45.992Z: Placeholder message for upcoming automation job execution for issue_hooks
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Tao Guo