mirror of
https://github.com/github/codeql-action.git
synced 2026-05-21 07:50:10 +00:00
Move conversion of PR diff-range paths to absolute paths
This commit is contained in:
Generated
+5
-7
@@ -90452,8 +90452,8 @@ var require_primordials = __commonJS({
|
||||
ArrayPrototypeIndexOf(self2, el) {
|
||||
return self2.indexOf(el);
|
||||
},
|
||||
ArrayPrototypeJoin(self2, sep4) {
|
||||
return self2.join(sep4);
|
||||
ArrayPrototypeJoin(self2, sep3) {
|
||||
return self2.join(sep3);
|
||||
},
|
||||
ArrayPrototypeMap(self2, fn) {
|
||||
return self2.map(fn);
|
||||
@@ -102340,7 +102340,7 @@ var require_commonjs16 = __commonJS({
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
constructor(cwd = process.cwd(), pathImpl, sep4, { nocase, childrenCacheSize = 16 * 1024, fs: fs17 = defaultFS } = {}) {
|
||||
constructor(cwd = process.cwd(), pathImpl, sep3, { nocase, childrenCacheSize = 16 * 1024, fs: fs17 = defaultFS } = {}) {
|
||||
this.#fs = fsFromOption(fs17);
|
||||
if (cwd instanceof URL || cwd.startsWith("file://")) {
|
||||
cwd = (0, node_url_1.fileURLToPath)(cwd);
|
||||
@@ -102351,7 +102351,7 @@ var require_commonjs16 = __commonJS({
|
||||
this.#resolveCache = new ResolveCache();
|
||||
this.#resolvePosixCache = new ResolveCache();
|
||||
this.#children = new ChildrenCache(childrenCacheSize);
|
||||
const split = cwdPath.substring(this.rootPath.length).split(sep4);
|
||||
const split = cwdPath.substring(this.rootPath.length).split(sep3);
|
||||
if (split.length === 1 && !split[0]) {
|
||||
split.pop();
|
||||
}
|
||||
@@ -127560,7 +127560,6 @@ function filterAlertsByDiffRange(logger, sarif) {
|
||||
if (!diffRanges?.length) {
|
||||
return sarif;
|
||||
}
|
||||
const checkoutPath = getRequiredInput("checkout_path");
|
||||
for (const run2 of sarif.runs) {
|
||||
if (run2.results) {
|
||||
run2.results = run2.results.filter((result) => {
|
||||
@@ -127574,9 +127573,8 @@ function filterAlertsByDiffRange(logger, sarif) {
|
||||
if (!locationUri || locationStartLine === void 0) {
|
||||
return false;
|
||||
}
|
||||
const locationPath = path13.join(checkoutPath, locationUri).replaceAll(path13.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