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 60a71eea4b
commit 5440134196

View file

@ -47,6 +47,7 @@ function listChangedPaths() {
'git',
[
'diff',
'--no-renames',
'--name-status',
`${mergeBase}...HEAD`,
'--',
@ -89,10 +90,10 @@ if (diffLines.length === 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 [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()