mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-13 23:53:05 +00:00
fix(OPS85): guard do changelog usa --no-renames — a migração agrega-deletado+HISTORY-criado não é rename
This commit is contained in:
parent
29081ec4f9
commit
50ca9d5e64
1 changed files with 3 additions and 2 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in a new issue