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, and disable_ai_catalog_skill audit 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

Screenshots or screen recordings

Before After

How to set up and validate locally

  1. In the Rails console, run Feature.enable(:ai_catalog_skills).
  2. Publish a skill in a project. See the steps in !268368 (merged).
  3. Visit /<project>/-/automate/skills, then enable the skill in the project.
  4. Open the skill and select Disable.
  5. 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.

🤖 Generated with Claude Code

Merge request reports

Loading
Loading