Files
fn_registry/bash/functions/infra/gitea_create_webhook.md
egutierrez 47fac22230 chore: auto-commit (799 archivos)
- .claude/CLAUDE.md
- .claude/commands/subagentes.md
- .claude/rules/INDEX.md
- .mcp.json
- bash/functions/cybersecurity/analyze_dns.md
- bash/functions/cybersecurity/audit_http_headers.md
- bash/functions/cybersecurity/audit_ssh_config.md
- bash/functions/cybersecurity/check_firewall.md
- bash/functions/cybersecurity/detect_suspicious_users.md
- bash/functions/cybersecurity/encrypt_file.md
- ...

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 00:28:20 +02:00

1.6 KiB

name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, params, output, tested, tests, test_file_path, file_path
name kind lang domain version purity signature description tags uses_functions uses_types returns returns_optional error_type imports params output tested tests test_file_path file_path
gitea_create_webhook function bash infra 1.0.0 impure gitea_create_webhook(owner: string, repo: string, target_url: string, secret?: string) -> json Crea un webhook de push en un repositorio Gitea. El webhook notifica a target_url en cada push.
gitea
webhook
push
deploy
ci
infra
pendiente-usar
false error_go_core
name desc
owner usuario u organización propietaria del repositorio
name desc
repo nombre del repositorio
name desc
target_url URL que recibirá el POST del webhook en cada push
name desc
secret secreto compartido para firmar el payload (opcional)
JSON con webhook_id, owner, repo, target_url false
bash/functions/infra/gitea_create_webhook.sh

Ejemplo

source bash/functions/infra/gitea_create_webhook.sh

export GITEA_URL="https://git.example.com"
export GITEA_TOKEN="$(pass agentes/dataforge-token)"

# Crear webhook para auto-deploy
gitea_create_webhook "myorg" "dag_engine" "http://vps:9090/webhook/push" "mi_secreto"
# {"webhook_id":42,"owner":"myorg","repo":"dag_engine","target_url":"http://vps:9090/webhook/push"}

Notas

  • Requiere GITEA_URL y GITEA_TOKEN como variables de entorno.
  • Solo escucha eventos push. Para otros eventos, modificar el array events en el payload.
  • Si el webhook ya existe para la misma URL, Gitea crea uno duplicado (no es idempotente).