CRM de WhatsApp, Instagram, Messenger y TikTok de Wachato, basado en Vocero CRM (MIT), listo para desplegar un negocio por instancia: - Marca blanca: nombre, color, moneda y giro del negocio desde el .env (BRAND_NAME, BRAND_ACCENT, BRAND_CURRENCY, BUSINESS_DESCRIPTION); se aplican una vez y luego manda Ajustes → Marca. - Superadmin sembrado al arrancar (SUPERADMIN_*), idempotente. - Servicios y precios, campos personalizados, exportación a Excel/PDF, respaldos, agenda, atribución de anuncios y transcripción de notas de voz. - Diseño con contraste AAA, tema claro y oscuro. - Despliegue: docker compose (Caddy opcional), plantillas para paneles con reverse proxy (deploy/aapanel), imagen publicada en GHCR por la CI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
52 lines
1.9 KiB
PowerShell
52 lines
1.9 KiB
PowerShell
#!/usr/bin/env pwsh
|
|
# Git-specific common functions for the git extension.
|
|
# Extracted from scripts/powershell/common.ps1 -- contains only git-specific
|
|
# branch validation and detection logic.
|
|
|
|
function Test-HasGit {
|
|
param([string]$RepoRoot = (Get-Location))
|
|
try {
|
|
if (-not (Test-Path (Join-Path $RepoRoot '.git'))) { return $false }
|
|
if (-not (Get-Command git -ErrorAction SilentlyContinue)) { return $false }
|
|
git -C $RepoRoot rev-parse --is-inside-work-tree 2>$null | Out-Null
|
|
return ($LASTEXITCODE -eq 0)
|
|
} catch {
|
|
return $false
|
|
}
|
|
}
|
|
|
|
function Get-SpecKitEffectiveBranchName {
|
|
param([string]$Branch)
|
|
if ($Branch -match '^([^/]+)/([^/]+)$') {
|
|
return $Matches[2]
|
|
}
|
|
return $Branch
|
|
}
|
|
|
|
function Test-FeatureBranch {
|
|
param(
|
|
[string]$Branch,
|
|
[bool]$HasGit = $true
|
|
)
|
|
|
|
# For non-git repos, we can't enforce branch naming but still provide output
|
|
if (-not $HasGit) {
|
|
Write-Warning "[specify] Warning: Git repository not detected; skipped branch validation"
|
|
return $true
|
|
}
|
|
|
|
$raw = $Branch
|
|
$Branch = Get-SpecKitEffectiveBranchName $raw
|
|
|
|
# Accept sequential prefix (3+ digits) but exclude malformed timestamps
|
|
# Malformed: 7-or-8 digit date + 6-digit time with no trailing slug (e.g. "2026031-143022" or "20260319-143022")
|
|
$hasMalformedTimestamp = ($Branch -match '^[0-9]{7}-[0-9]{6}-') -or ($Branch -match '^(?:\d{7}|\d{8})-\d{6}$')
|
|
$isSequential = ($Branch -match '^[0-9]{3,}-') -and (-not $hasMalformedTimestamp)
|
|
if (-not $isSequential -and $Branch -notmatch '^\d{8}-\d{6}-') {
|
|
[Console]::Error.WriteLine("ERROR: Not on a feature branch. Current branch: $raw")
|
|
[Console]::Error.WriteLine("Feature branches should be named like: 001-feature-name, 1234-feature-name, or 20260319-143022-feature-name")
|
|
return $false
|
|
}
|
|
return $true
|
|
}
|