ci: normalizar workflows e templates de PR/issue - #3
Merged
Conversation
Datasus era o repo OSS mais defasado em estrutura .github comparado com fhir-brasil e medbench-brasil. Este commit fecha a lacuna: - .github/workflows/review.yml: copiado de fhir-brasil (workflow de code review automatizado por Claude via Bedrock, com round 1/round 2 e detecção de docs-only para skip) - .github/workflows/ci.yml: adiciona job "review" que invoca review.yml via workflow_call em PRs - .github/PULL_REQUEST_TEMPLATE.md: template de PR com checklist específico do datasus (pacotes dbc/core, vintages de schema) - .github/ISSUE_TEMPLATE/bug_report.md, feature_request.md: templates com campos relevantes para microdados DATASUS (sistema, vintage, fonte oficial) - .husky/pre-push: hook novo que roda lockfile check + format check + lint + typecheck + test antes do push, evitando quebrar CI Workflows / templates intencionalmente NÃO incluídos: - preview.yml / build-site / deploy-site: datasus não tem site - publish-tag.yml (medbench-only) - IG / SUSHI / Simplifier (fhir-brasil-only)
Claude Review - Round 1SummaryThis PR adds GitHub issue/PR templates, a CI-integrated Claude code review workflow using AWS Bedrock, and a Husky pre-push hook for local validation. Changes
🔍 Found 7 suggestions (see inline comments) Automated review by Claude Opus 4.6 - Round 1 of 2 | 6,314 in / 1,235 out | $0.0624 |
Após review do PR: --offline força pnpm a usar apenas o cache local, o que falha em fresh clones ou após branch switch que introduz dependências novas. --frozen-lockfile sozinho garante reprodutibilidade sem essa fragilidade — a diferença de velocidade é negligível quando o cache já está quente, e quando não está, queremos a falha cedo (no install) e não ofuscada por --offline.
Claude Review - Round 2 (Final)SummaryThis PR migrates shared configuration (ESLint, Prettier, commitlint, TSConfig) from inline definitions to centralized Changes
🔍 Found 1 suggestions (see inline comments) Automated review by Claude Opus 4.6 - Round 2 (Final) - No further reviews will be performed | 51,646 in / 373 out | $0.2676 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resumo
Datasus era o repo OSS mais defasado em estrutura
.githubcomparado com fhir-brasil e medbench. Este PR fecha a lacuna sem mudar nenhum código de produto.Adicionado
.github/workflows/review.yml.github/workflows/ci.yml(modificado)reviewque invocareview.ymlviaworkflow_callem PRs.github/PULL_REQUEST_TEMPLATE.mddbc/core, vintages de schema).github/ISSUE_TEMPLATE/bug_report.md,feature_request.md.husky/pre-pushIntencionalmente NÃO incluído
preview.yml/build-site/deploy-site— datasus não tem sitepublish-tag.yml(medbench-only)Pré-requisitos para o review.yml funcionar
O job
Code Review / Claude Reviewprecisa dos secretsAWS_ACCESS_KEY_IDeAWS_SECRET_ACCESS_KEYconfigurados no nível do org ou do repo (mesmos secrets já em uso em fhir-brasil e medbench-brasil). Se ainda não estiverem visíveis paraPrecisa-Saude/datasus-brasil, o job vai falhar — basta adicionar acesso. O stepReview Status(que decide se roda) usa sóGITHUB_TOKENe funciona sem config adicional.Test plan
pnpm format:check && pnpm turbo run lint typecheck testverde.husky/pre-pushroda os mesmos checks e passa (validado no próprio push deste branch)Code Review / Review Statuscorre (eClaude Reviewroda OU pula com mensagem clara se faltar AWS creds)