Skip to content

Add a service to load automation rules from project's repo

Tao Guo requested to merge astao/automation/load-rules-service into master

What does this MR do and why?

This MR implements the API and the underlying service to retrieve Automation Rules for the Automation Manager's list view. It includes:

  • Add a service to load automation rules from project's repo
  • Add GraphQL query and resolver for fetching automation rules

For more context:

Epic: gitlab-org/incubation-engineering/no-code-low-code&1

Solution design: #388496 (closed)

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

  1. Upload a GitLab Ultimate license
  2. Saves an example automation policy into a project's repo, under: .gitlab/automations/policy.yml
  3. Visit GraphiQL, e.g. http://gdk.test:3000/-/graphql-explorer
  4. Run query, e.g.:
{
  project(fullPath: "flightjs/flight") {
    automationRules {
      nodes {
        triggerType
        name
        yaml
        updatedAt
      }
    }
  }
}

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Tao Guo

Merge request reports