Loading
Add audit events for enabling AI catalog skills
What does this MR do and why?
Add audit events for enabling, updating, and disabling an AI catalog skill. Before this MR, no audit event was sent: EventsTracking looks up Ai::Catalog::Skills::AuditEventMessageService, which did not exist.
This MR:
- Adds
Ai::Catalog::Skills::AuditEventMessageService. The base class builds the enable, update, and disable messages. - Adds the
enable_ai_catalog_skill,update_enabled_ai_catalog_skill, anddisable_ai_catalog_skillaudit event types.
Skills are published from the repository, not created or edited in the catalog, so the service returns no create or update messages for the skill item itself.
All skill UI is behind the ai_catalog_skills feature flag (default off).
References
- Follow-up issue: #639786
- Raised in !268927 (merged)
- Epic: gitlab-org#22961
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
- In the Rails console, run
Feature.enable(:ai_catalog_skills). - Publish a skill in a project. See the steps in !268368 (merged).
- Visit
/<project>/-/automate/skills, then enable the skill in the project. - Open the skill and select Disable.
- Visit
/<project>/-/audit_events. The list shows Enabled AI skill for project and Disabled AI skill for project.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.