chore(governance): add AGENTS.md, maintenance documentation, Gitea workflows and sync monitoring scripts
CI - Validacao Go / Validar Codigo e Testes (push) Successful in 5m59s

This commit is contained in:
jfeng committed 2026-11-09 11:17:45 -03:00
1 parent 9337afc47e
commit 25117bd2c1
13 files changed
+1040

No files matched your search

+67
View File
@@ -0,0 +1,67 @@
#!/usr/bin/env bash
set -euo pipefail
REPORT_DATE=$(date +%Y-%m-%d_%H%M%S)
REPORT_FILE="relatorio_atualizacao_${REPORT_DATE}.md"
echo "=== Iniciando Auditoria de Atualizacoes do Upstream (${REPORT_DATE}) ==="
# 1. Configurar ou garantir remoto upstream
if ! git remote | grep -q "^upstream$"; then
git remote add upstream https://github.com/evolution-foundation/evolution-go.git
fi
git fetch upstream --tags
LOCAL_HEAD=$(git rev-parse HEAD)
UPSTREAM_MAIN=$(git rev-parse upstream/main)
UPSTREAM_DEV=$(git rev-parse upstream/develop 2>/dev/null || echo "N/A")
NEW_COMMITS_COUNT=$(git rev-list --count HEAD..upstream/main 2>/dev/null || echo 0)
NEW_COMMITS_LIST=$(git log HEAD..upstream/main --oneline -n 15 2>/dev/null || echo "Nenhum commit novo.")
LATEST_LOCAL_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "nenhuma")
LATEST_UPSTREAM_TAG=$(git tag -l --sort=-v:refname | head -n 1)
# Whatsmeow version comparison
LOCAL_WHATSMEOW=$(grep "go.mau.fi/whatsmeow" go.mod | awk '{print $2}' || echo "N/A")
cat << EOF > "${REPORT_FILE}"
# Relatorio de Monitoramento de Atualizacoes — Upstream EvoGO
**Data da Auditoria:** $(date '+%d/%m/%Y %H:%M:%S')
**Commit Local Base:** \`${LOCAL_HEAD}\`
**Tag Local Recente:** \`${LATEST_LOCAL_TAG}\`
---
## 1. Estado da Branch Principal (Upstream Main)
- **Commit Upstream Main:** \`${UPSTREAM_MAIN}\`
- **Commits a frente do upstream:** ${NEW_COMMITS_COUNT}
- **Ultima Tag Upstream:** \`${LATEST_UPSTREAM_TAG}\`
### Commits Recentes no Upstream:
\`\`\`
${NEW_COMMITS_LIST}
\`\`\`
---
## 2. Dependencia Central (Whatsmeow)
- **Versao Whatsmeow no go.mod local:** \`${LOCAL_WHATSMEOW}\`
---
## 3. Analise de Impacto e Conflitos
$([ "$NEW_COMMITS_COUNT" -gt 0 ] && echo "⚠ **Novidades detectadas no upstream!** Recomenda-se abrir branch de analise em \`maintenance/sync-upstream\`." || echo "✓ **Ambiente alinhado.** Nao ha novos commits pendentes na branch principal do upstream.")
---
*Relatorio gerado automaticamente pelo pipeline de monitoramento EvoGO.*
EOF
echo "Relatorio gerado em: ${REPORT_FILE}"
cat "${REPORT_FILE}"