# GitHub Actions Workflow Configuration
# Configuration for documentation synchronization workflows

# Security settings
security:
  # Require manual approval for external PRs
  require_approval_for_forks: true
  
  # Maximum files allowed per PR
  max_files_per_pr: 50
  
  # Maximum file size in MB
  max_file_size_mb: 10
  
  # Allowed file extensions
  allowed_extensions:
    - .md
    - .mdx
    - .json
  
  # Trusted contributors (GitHub usernames)
  trusted_contributors:
    - guchenhe@gmail.com
    # Add more trusted contributors here

# Rate limiting
rate_limits:
  # Maximum sync operations per hour per PR author
  max_syncs_per_hour: 5
  
  # Maximum API calls per sync operation  
  max_api_calls_per_sync: 100

# Translation settings
translation:
  # Target languages
  target_languages:
    - zh-hans
    - ja-jp
  
  # Maximum files to translate in a single operation
  max_files_per_batch: 10
  
  # Timeout for translation operations (seconds)
  translation_timeout: 300

# Branch settings
branches:
  # Branches that trigger automatic sync
  auto_sync_branches:
    - main
    - revamp
  
  # Branch protection for external PRs
  require_branch_protection: true
  
  # Prefix for sync branches
  sync_branch_prefix: "docs-sync-pr-"

# Notification settings
notifications:
  # Comment on PRs with sync status
  comment_on_pr: true
  
  # Include translation preview links
  include_preview_links: true
  
  # Notify on sync failures
  notify_on_failure: true

# Artifact settings
artifacts:
  # Retention period for analysis artifacts (days)
  retention_days: 1
  
  # Maximum artifact size (MB)
  max_artifact_size_mb: 50

# Approval workflow
approval:
  # Required approver associations for external PRs
  required_approver_associations:
    - OWNER
    - MEMBER
    - COLLABORATOR
  
  # Require review from code owners
  require_code_owner_review: false
  
  # Auto-approve for trusted contributors
  auto_approve_trusted: true

# Dry run mode (for testing)
dry_run:
  # Enable dry run mode (no actual changes made)
  enabled: false
  
  # Show what would be changed
  show_diff: true

# Monitoring and logging
monitoring:
  # Log all operations
  enable_logging: true
  
  # Include security events in logs
  log_security_events: true
  
  # Monitor API usage
  monitor_api_usage: true

# Emergency settings
emergency:
  # Disable all workflows
  disable_workflows: false
  
  # Disable external PR processing only
  disable_external_prs: false
  
  # Emergency contact (GitHub username)
  emergency_contact: "guchenhe@gmail.com"

# Version info
version: "1.0.0"
updated: "2024-08-22"