fix(github): check push watch paths against the net change of the push

Closes #10937

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Andras Bacsai
2026-10-15 22:06:30 +02:00
co-authored by Claude Opus 5.5
parent 2db26e88ab
commit 19430b461a
3 changed files with 207 additions and 1 deletions
+6 -1
View File
@@ -417,7 +417,12 @@ function getGithubCommitRangeFiles(?GithubApp $source, string $owner, string $re
return null;
}
return $files->pluck('filename')->filter()->values()->toArray();
// A renamed file also changes its previous path.
return $files->flatMap(fn (mixed $file): array => [data_get($file, 'filename'), data_get($file, 'previous_filename')])
->filter(fn (mixed $filename): bool => is_string($filename) && $filename !== '')
->unique()
->values()
->toArray();
} catch (Exception $e) {
return null;
}