mirror of
https://github.com/github/codeql-action.git
synced 2026-05-17 08:40:16 +00:00
Move conversion of PR diff-range paths to absolute paths
This commit is contained in:
Generated
+1
-3
@@ -90616,7 +90616,6 @@ function filterAlertsByDiffRange(logger, sarif) {
|
||||
if (!diffRanges?.length) {
|
||||
return sarif;
|
||||
}
|
||||
const checkoutPath = getRequiredInput("checkout_path");
|
||||
for (const run of sarif.runs) {
|
||||
if (run.results) {
|
||||
run.results = run.results.filter((result) => {
|
||||
@@ -90630,9 +90629,8 @@ function filterAlertsByDiffRange(logger, sarif) {
|
||||
if (!locationUri || locationStartLine === void 0) {
|
||||
return false;
|
||||
}
|
||||
const locationPath = path10.join(checkoutPath, locationUri).replaceAll(path10.sep, "/");
|
||||
return diffRanges.some(
|
||||
(range) => range.path === locationPath && (range.startLine <= locationStartLine && range.endLine >= locationStartLine || range.startLine === 0 && range.endLine === 0)
|
||||
(range) => range.path === locationUri && (range.startLine <= locationStartLine && range.endLine >= locationStartLine || range.startLine === 0 && range.endLine === 0)
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user