fix(ci-base): checkout do security-trivy cai para refs/pull/N/head em PR [TH-60348] #82
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/TH-60348-trivy-checkout-pr-head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
O que
Terceiro sintoma da TH-60348: o checkout git puro do
security-trivy(ci-base) falhava em todo PR para main de quem usa o ci-base (HelpCor, Hub, Fina).Em
pull_request, ogithub.shaé o merge-SHA e ogithub.reférefs/pull/N/merge— o Forgejo não anuncia nenhum dos dois, então o fetch falhava duas vezes e o job saía em ~5s. Caso real: release v2.89.0 do HelpCor (#1438) bloqueado peloCI / Security — CVE Gate (Trivy)com deps limpas. Em PR→develop o gate dá "não se aplica", por isso ninguém tinha visto.Mudança (aditiva)
Em
pull_request, o fallback passa a serrefs/pull/<number>/head(sempre anunciado; paratrivy fsem lockfiles é o mesmo conteúdo do merge). Fora de PR, segue ogithub.ref. Push e PRs que já funcionavam não mudam.Validação
TestCiBaseTrivyCheckoutDePR(ordem: SHA → head do PR → ref do evento) + ci-unico (116), ci-ok, soberania, if-em-caller verdes.🤖 Generated with Claude Code
https://claude.ai/code/session_01ES1xwVdpQV69zEsuLLKzx2