version: 2
updates:
  # Backend – Gradle (Java / Spring)
  - package-ecosystem: "gradle"
    directory: "/booklore-api"
    schedule:
      interval: "weekly"
      day: "friday"
      time: "03:00"
      timezone: "UTC"
    open-pull-requests-limit: 5
    labels:
      - "dependencies"
      - "backend"
    commit-message:
      prefix: "chore(deps)"
    groups:
      gradle-dependencies:
        patterns:
          - "*"

  # Frontend – npm (Angular)
  - package-ecosystem: "npm"
    directory: "/booklore-ui"
    schedule:
      interval: "weekly"
      day: "friday"
      time: "03:00"
      timezone: "UTC"
    open-pull-requests-limit: 5
    labels:
      - "dependencies"
      - "frontend"
    commit-message:
      prefix: "chore(deps)"
    groups:
      npm-dependencies:
        patterns:
          - "*"

  # GitHub Actions
  - package-ecosystem: "github-actions"
    directory: "/"
    schedule:
      interval: "monthly"
    labels:
      - "dependencies"
      - "ci"
    commit-message:
      prefix: "chore(deps)"
