fix(OPS85): guard do changelog usa --no-renames — a migração agrega-deletado+HISTORY-criado não é rename

This commit is contained in:
Francisco Solla 2026-08-24 13:30:51 -03:00
parent 29081ec4f9
commit 50ca9d5e64

View file

@ -47,6 +47,7 @@ function listChangedPaths() {
'git', 'git',
[ [
'diff', 'diff',
'--no-renames',
'--name-status', '--name-status',
`${mergeBase}...HEAD`, `${mergeBase}...HEAD`,
'--', '--',
@ -89,10 +90,10 @@ if (diffLines.length === 0) {
process.exit(0) process.exit(0)
} }
// R (rename): status + old path + new path — use the new path. // --no-renames guarantees the `STATUS<TAB>path` shape (no R entries).
const changed = diffLines.map((line) => { const changed = diffLines.map((line) => {
const [status, ...rest] = line.split('\t') const [status, ...rest] = line.split('\t')
return { status, path: status.startsWith('R') ? rest[rest.length - 1] : rest.join('\t') } return { status, path: rest.join('\t') }
}) })
const body = readPrBody() const body = readPrBody()