version: 2
updates:
  #region Github Actions

  - package-ecosystem: "github-actions"
    directories:
      - /
      # Required to update composite actions
      # https://github.com/dependabot/dependabot-core/issues/6704
      - /.github/actions/cherry-pick
      - /.github/actions/setup
      - /.github/actions/docker-push-variables
      - /.github/actions/comment-pr-instructions
      - /.github/actions/test-results
    schedule:
      interval: daily
      time: "04:00"
    open-pull-requests-limit: 10
    commit-message:
      prefix: "ci:"
    labels:
      - dependencies
    cooldown:
      default-days: 3

  #endregion

  #region Golang

  - package-ecosystem: gomod
    directory: "/"
    schedule:
      interval: daily
      time: "04:00"
    open-pull-requests-limit: 10
    commit-message:
      prefix: "core:"
    labels:
      - dependencies
    cooldown:
      default-days: 7
      semver-major-days: 14
      semver-patch-days: 3
      exclude:
        - "golang.org/x/crypto"
        - "golang.org/x/net"
        - "github.com/golang-jwt/jwt/*"
        - "github.com/coreos/go-oidc/*"
        - "github.com/go-ldap/ldap/*"

  #endregion

  #region Rust

  - package-ecosystem: cargo
    directory: "/"
    schedule:
      interval: daily
      time: "04:00"
    open-pull-requests-limit: 10
    commit-message:
      prefix: "core:"
    labels:
      - dependencies
    cooldown:
      default-days: 7
      semver-major-days: 14
      semver-patch-days: 3
      exclude:
        - rustls-webpki

  - package-ecosystem: rust-toolchain
    directory: "/"
    schedule:
      interval: daily
      time: "04:00"
    open-pull-requests-limit: 10
    commit-message:
      prefix: "core:"
    labels:
      - dependencies
    cooldown:
      default-days: 3

  #endregion

  #region Web

  - package-ecosystem: npm
    directories:
      - "/"
      - "/web"
      - "/web/packages/*"
    schedule:
      interval: daily
      time: "04:00"
    labels:
      - dependencies
    open-pull-requests-limit: 10
    commit-message:
      prefix: "web:"
    cooldown:
      default-days: 7
      semver-major-days: 14
      semver-patch-days: 3
    groups:
      sentry:
        patterns:
          - "@sentry/*"
      babel:
        patterns:
          - "@babel/*"
          - "babel-*"
      eslint:
        patterns:
          - "@eslint/*"
          - "@typescript-eslint/*"
          - "eslint-*"
          - "eslint"
          - "typescript-eslint"
      storybook:
        patterns:
          - "@storybook/*"
          - "*storybook*"
      bundler:
        patterns:
          - "@esbuild/*"
          - "esbuild*"
          - "@vitest/*"
          - "vitest"
      rollup:
        patterns:
          - "@rollup/*"
          - "rollup-*"
          - "rollup*"
      swc:
        patterns:
          - "@swc/*"
          - "swc-*"
      goauthentik:
        patterns:
          - "@goauthentik/*"
      react:
        patterns:
          - "react"
          - "react-dom"
          - "@types/react"
          - "@types/react-dom"

  #endregion

  #region NPM Packages

  - package-ecosystem: npm
    directories:
      - "/packages/esbuild-plugin-live-reload"
      - "/packages/prettier-config"
      - "/packages/tsconfig"
      - "/packages/docusaurus-config"
      - "/packages/eslint-config"
    schedule:
      interval: daily
      time: "04:00"
    labels:
      - dependencies
    open-pull-requests-limit: 10
    commit-message:
      prefix: "core, web:"
    cooldown:
      default-days: 7
      semver-major-days: 14
      semver-patch-days: 3
    groups:
      sentry:
        patterns:
          - "@sentry/*"
      babel:
        patterns:
          - "@babel/*"
          - "babel-*"
      eslint:
        patterns:
          - "@eslint/*"
          - "@typescript-eslint/*"
          - "eslint-*"
          - "eslint"
          - "typescript-eslint"
      storybook:
        patterns:
          - "@storybook/*"
          - "*storybook*"
      bundler:
        patterns:
          - "@esbuild/*"
          - "esbuild*"
          - "@vitest/*"
          - "vitest"
      rollup:
        patterns:
          - "@rollup/*"
          - "rollup-*"
          - "rollup*"
      swc:
        patterns:
          - "@swc/*"
          - "swc-*"
      goauthentik:
        patterns:
          - "@goauthentik/*"
      react:
        patterns:
          - "react"
          - "react-dom"
          - "@types/react"
          - "@types/react-dom"

  #endregion

  # #region Documentation

  - package-ecosystem: npm
    directory: "/website"
    schedule:
      interval: daily
      time: "04:00"
    open-pull-requests-limit: 10
    commit-message:
      prefix: "website:"
    labels:
      - dependencies
    cooldown:
      default-days: 7
      semver-major-days: 14
      semver-patch-days: 3
    groups:
      docusaurus:
        patterns:
          - "@docusaurus/*"
          - "@goauthentik/docusaurus-config"
      build:
        patterns:
          - "@swc/*"
          - "swc-*"
          - "lightningcss*"
          - "@rspack/binding*"
      goauthentik:
        patterns:
          - "@goauthentik/eslint-config"
          - "@goauthentik/prettier-config"
          - "@goauthentik/tsconfig"
      eslint:
        patterns:
          - "@eslint/*"
          - "@typescript-eslint/*"
          - "eslint-*"
          - "eslint"
          - "typescript-eslint"

  #endregion

  # AWS Lifecycle

  - package-ecosystem: npm
    directory: "/lifecycle/aws"
    schedule:
      interval: daily
      time: "04:00"
    open-pull-requests-limit: 10
    commit-message:
      prefix: "lifecycle/aws:"
    labels:
      - dependencies
    cooldown:
      default-days: 7
      semver-major-days: 14
      semver-patch-days: 3

  #endregion

  #region Python

  - package-ecosystem: uv
    directory: "/"
    schedule:
      interval: daily
      time: "04:00"
    open-pull-requests-limit: 10
    commit-message:
      prefix: "core:"
    labels:
      - dependencies
    cooldown:
      default-days: 7
      semver-major-days: 14
      semver-patch-days: 3
      exclude:
        - "django"
        - "cryptography"
        - "pyjwt"
        - "xmlsec"
        - "lxml"
        - "psycopg"
        - "pyopenssl"

  #endregion

  #region Docker

  - package-ecosystem: docker
    directories:
      - /lifecycle/container
      - /website
    schedule:
      interval: daily
      time: "04:00"
    open-pull-requests-limit: 10
    commit-message:
      prefix: "core:"
    labels:
      - dependencies
    cooldown:
      default-days: 3
  - package-ecosystem: docker-compose
    directories:
      - /packages/client-go
      - /packages/client-rust
      - /packages/client-ts
      # - /scripts # Maybe
      - /tests/e2e
    schedule:
      interval: daily
      time: "04:00"
    open-pull-requests-limit: 10
    commit-message:
      prefix: "core:"
    labels:
      - dependencies
    cooldown:
      default-days: 3

  #endregion
