# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
# Required for uv support for now
enable-beta-ecosystems: true
updates:
  # Enable version updates for pnpm
  - package-ecosystem: "npm"
    target-branch: "dev"
    # Look for `pnpm-lock.yaml` file in the `/src-ui` directory
    directory: "/src-ui"
    open-pull-requests-limit: 10
    schedule:
      interval: "monthly"
    labels:
      - "frontend"
      - "dependencies"
    groups:
      frontend-angular-dependencies:
        patterns:
          - "@angular*"
          - "@ng-*"
          - "ngx-*"
          - "ng2-pdf-viewer"
      frontend-jest-dependencies:
        patterns:
          - "@types/jest"
          - "jest*"
      frontend-eslint-dependencies:
        patterns:
          - "@typescript-eslint*"
          - "eslint"
  # Enable version updates for Python
  - package-ecosystem: "uv"
    target-branch: "dev"
    directory: "/"
    # Check for updates once a week
    schedule:
      interval: "weekly"
    labels:
      - "backend"
      - "dependencies"
    groups:
      development:
        patterns:
          - "*pytest*"
          - "ruff"
          - "mkdocs-material"
          - "pre-commit*"
      django:
        patterns:
          - "*django*"
          - "drf-*"
      major-versions:
        update-types:
          - "major"
      small-changes:
        update-types:
          - "minor"
          - "patch"
        exclude-patterns:
          - "*django*"
          - "drf-*"
      pre-built:
        patterns:
          - psycopg*
          - zxing-cpp
  # Enable updates for GitHub Actions
  - package-ecosystem: "github-actions"
    target-branch: "dev"
    directory: "/"
    schedule:
      # Check for updates to GitHub Actions every month
      interval: "monthly"
    labels:
      - "ci-cd"
      - "dependencies"
    groups:
      actions:
        update-types:
          - "major"
          - "minor"
          - "patch"
  # Update Dockerfile in root directory
  - package-ecosystem: "docker"
    directories:
      - "/"
      - "/.devcontainer/"
    schedule:
      interval: "weekly"
    open-pull-requests-limit: 5
    labels:
      - "dependencies"
    commit-message:
      prefix: "docker"
      include: "scope"
  # Update Docker Compose files in docker/compose directory
  - package-ecosystem: "docker-compose"
    directory: "/docker/compose/"
    schedule:
      interval: "weekly"
    open-pull-requests-limit: 5
    labels:
      - "dependencies"
    commit-message:
      prefix: "docker-compose"
      include: "scope"
    groups:
      # Individual groups for each image
      gotenberg:
        patterns:
          - "docker.io/gotenberg/gotenberg*"
      tika:
        patterns:
          - "docker.io/apache/tika*"
      redis:
        patterns:
          - "docker.io/library/redis*"
      mariadb:
        patterns:
          - "docker.io/library/mariadb*"
      postgres:
        patterns:
          - "docker.io/library/postgres*"
