Skip to content

Draft: Add API for deployment frequency forecasting

What does this MR do and why?

Introduced forecasting GraphQL API for deployment frequency.

API can be used to get a forecast on upcoming deployment frequency values for given project. Please not the API is in alpha state and can be changed at any time.

Screenshots or screen recordings

image

How to set up and validate locally

  1. Open GraphQL explorer http://172.16.123.1:3000/-/graphql-explorer
  2. Execute sample API request
mutation {
  buildForecast(input: {
    type: "deployment_frequency", 
    contextId: "gid://gitlab/Project/1",
    horizon: 30}
  ) {
    forecast {
      status
      values {
        nodes {
          datapoint
          value
        }
      }
    }
  }
}

MR acceptance checklist

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

Related to #409871

Merge request reports