fix: workflows de snapshot usam create-pull-request (branch main protegida) by lucianopf · Pull Request #896 · BrasilAPI/BrasilAPI · GitHub
Skip to content

fix: workflows de snapshot usam create-pull-request (branch main protegida) - #896

Merged
lucianopf merged 1 commit into
mainfrom
fix/snapshot-workflows-pr
Aug 19, 2026
Merged

lucianopf merged 1 commit into
mainfrom
fix/snapshot-workflows-pr

Conversation

@lucianopf

Copy link
Copy Markdown
Member

Os workflows de snapshot agendados faziam git commit && git push direto na main, que tem branch protection desde 2026 → falham com GH006: Protected branch update failed.\n\n### Correção\n| Workflow | Status |\n|---|---|\n| banks-headquarters-snapshot.yml (#876) | já falhava semanalmente (10/08 e 17/08) |\n| pix-participants-snapshot.yml (#892) | falharia no 1º agendamento com mudança de dados |\n\n### Padrão aplicado\nBloco commit+push → peter-evans/create-pull-request@v6 com guard exit 0 quando não há diff staged:\n- Snapshot sem mudança → workflow fica silencioso\n- Snapshot com mudança → abre PR para o maintainer aprovar/mergear\n- Requisitos: permissions: contents: write + pull-requests: write

…egida)

O push direto na main falha com GH006 (Protected branch update failed)
desde a branch protection. O banks-headquarters-snapshot.yml falhava
semanalmente; o pix-participants-snapshot.yml (entrou via #892) teria o
mesmo problema no 1o agendamento com mudança de dados.

Troca o bloco commit+push por peter-evans/create-pull-request@v6 com
guard (exit 0 se sem diff) — o PR só abre quando o snapshot muda.

Co-authored-by: Hermes Agent <noreply@nousresearch.com>
Ai-tool: hermes
Ai-model: deepseek-v4-flash
Ai-os: wsl
@vercel

vercel Bot commented Aug 19, 2026 •

Copy link
Copy Markdown

@sonarqubecloud

Copy link
Copy Markdown

@lucianopf
lucianopf merged commit 1e0d91d into main Aug 19, 2026
4 checks passed
@lucianopf
lucianopf deleted the fix/snapshot-workflows-pr branch August 19, 2026 11:17

This branch was successfully deployed

1 active deployment
Preview — 5b6741ba Deployed Aug 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant