# GitHub Copilot Configuration
# This file configures GitHub Copilot settings for the repository

# Allowed domains for Copilot to access
# These domains are trusted sources that Copilot can fetch information from
allowed_domains:
  # Standard license providers
  - "www.gnu.org"          # GNU licenses (GPL, LGPL, AGPL)
  - "opensource.org"       # Open Source Initiative
  - "choosealicense.com"   # GitHub's license chooser
  - "spdx.org"            # Software Package Data Exchange
  - "creativecommons.org" # Creative Commons licenses
  - "apache.org"          # Apache Software Foundation
  - "fsf.org"             # Free Software Foundation

  # Documentation and standards
  - "semver.org"          # Semantic Versioning
  - "keepachangelog.com"  # Changelog standards
  - "conventionalcommits.org" # Commit message standards

  # GitHub and related
  - "github.com"          # GitHub main site
  - "docs.github.com"     # GitHub documentation
  - "raw.githubusercontent.com" # GitHub raw content

  # Package managers and registries
  - "npmjs.com"           # npm registry
  - "pypi.org"            # Python Package Index
  - "packagist.org"       # PHP Composer packages
  - "rubygems.org"        # Ruby gems

  # Standards and specifications
  - "json-schema.org"     # JSON Schema
  - "w3.org"              # W3C standards
  - "ietf.org"            # IETF RFCs and standards

  # PHP and Joomla specific
  - "joomla.org"          # Joomla CMS
  - "docs.joomla.org"     # Joomla documentation
  - "downloads.joomla.org" # Joomla core downloads
  - "php.net"             # PHP documentation
  - "getcomposer.org"     # Composer dependency manager
  - "packagist.org"       # Composer package registry (also listed under packages)

  # Dolibarr specific
  - "dolibarr.org"        # Dolibarr ERP/CRM
  - "wiki.dolibarr.org"   # Dolibarr wiki
  - "docs.dolibarr.org"   # Dolibarr developer documentation

  # Moko Consulting
  - "mokoconsulting.tech"     # Moko Consulting main site
  - "*.mokoconsulting.tech"   # All Moko Consulting subdomains (API, docs, CDN, etc.)

  # Google services
  - "drive.google.com"             # Google Drive (file sharing and assets)
  - "docs.google.com"              # Google Docs
  - "sheets.google.com"            # Google Sheets
  - "accounts.google.com"          # Google authentication
  - "storage.googleapis.com"       # Google Cloud Storage
  - "*.googleapis.com"             # Google APIs (Maps, Fonts, etc.)
  - "*.googleusercontent.com"      # Google user-uploaded content and CDN
  - "fonts.googleapis.com"         # Google Fonts CSS
  - "fonts.gstatic.com"            # Google Fonts static assets

  # GitHub extended
  - "api.github.com"               # GitHub REST API
  - "upload.github.com"            # GitHub file uploads
  - "objects.githubusercontent.com" # GitHub release assets and LFS
  - "user-images.githubusercontent.com" # GitHub issue/PR image attachments
  - "codeload.github.com"          # GitHub archive downloads
  - "ghcr.io"                      # GitHub Container Registry
  - "pkg.github.com"               # GitHub Packages

  # Developer reference
  - "developer.mozilla.org"        # MDN Web Docs
  - "stackoverflow.com"            # Stack Overflow
  - "git-scm.com"                  # Git documentation

  # CDN and infrastructure
  - "cdn.jsdelivr.net"             # jsDelivr CDN
  - "unpkg.com"                    # unpkg CDN
  - "cdnjs.cloudflare.com"         # Cloudflare CDN
  - "img.shields.io"               # Shields.io badge images
  - "shields.io"                   # Shields.io badge service

  # Container registries
  - "hub.docker.com"               # Docker Hub
  - "registry-1.docker.io"         # Docker registry pulls
  - "index.docker.io"              # Docker index

  # CI / code quality
  - "codecov.io"                   # Code coverage reporting
  - "coveralls.io"                 # Coveralls coverage service
  - "sonarcloud.io"                # SonarCloud static analysis

  # Terraform / infrastructure
  - "registry.terraform.io"        # Terraform provider registry
  - "releases.hashicorp.com"       # HashiCorp release downloads
  - "checkpoint-api.hashicorp.com" # HashiCorp update checks

# Settings for code generation and suggestions
copilot:
  # Enable Copilot for this repository
  enabled: true

  # File patterns to include for Copilot suggestions
  include:
    - "**/*.py"
    - "**/*.js"
    - "**/*.php"
    - "**/*.md"
    - "**/*.yml"
    - "**/*.yaml"
    - "**/*.json"
    - "**/*.xml"
    - "**/*.sh"

  # File patterns to exclude from Copilot suggestions
  exclude:
    - "**/node_modules/**"
    - "**/vendor/**"
    - "**/build/**"
    - "**/dist/**"
    - "**/.git/**"
    - "**/LICENSE"
    - "**/CHANGELOG.md"

# Notes:
# ------
# - This configuration allows GitHub Copilot to fetch information from trusted sources
# - License providers are included to help with license text and compliance information
# - Package registries help with dependency management and version checking
# - Standards organizations provide authoritative specifications
# - Platform-specific sites (Joomla, Dolibarr, PHP) support our technology stack
# - All domains listed are well-known, reputable sources in their respective domains
# - This list focuses on read-only access to public information
# - No authentication credentials should be used with these domains
