mirror of
https://github.com/github/codeql-action.git
synced 2026-05-02 03:40:10 +00:00
Merge branch 'main' into sam-robson/overlay-fallback
This commit is contained in:
Generated
+3
-12
@@ -111013,15 +111013,9 @@ async function setupDiffInformedQueryRun(logger) {
|
|||||||
diffRanges,
|
diffRanges,
|
||||||
checkoutPath
|
checkoutPath
|
||||||
);
|
);
|
||||||
if (packDir === void 0) {
|
logger.info(
|
||||||
logger.warning(
|
`Successfully created diff range extension pack at ${packDir}.`
|
||||||
"Cannot create diff range extension pack for diff-informed queries; reverting to performing full analysis."
|
);
|
||||||
);
|
|
||||||
} else {
|
|
||||||
logger.info(
|
|
||||||
`Successfully created diff range extension pack at ${packDir}.`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return packDir;
|
return packDir;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@@ -111046,9 +111040,6 @@ extensions:
|
|||||||
return header + data;
|
return header + data;
|
||||||
}
|
}
|
||||||
function writeDiffRangeDataExtensionPack(logger, ranges, checkoutPath) {
|
function writeDiffRangeDataExtensionPack(logger, ranges, checkoutPath) {
|
||||||
if (ranges === void 0) {
|
|
||||||
return void 0;
|
|
||||||
}
|
|
||||||
if (ranges.length === 0) {
|
if (ranges.length === 0) {
|
||||||
ranges = [{ path: "", startLine: 0, endLine: 0 }];
|
ranges = [{ path: "", startLine: 0, endLine: 0 }];
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-18
@@ -251,16 +251,9 @@ export async function setupDiffInformedQueryRun(
|
|||||||
diffRanges,
|
diffRanges,
|
||||||
checkoutPath,
|
checkoutPath,
|
||||||
);
|
);
|
||||||
if (packDir === undefined) {
|
logger.info(
|
||||||
logger.warning(
|
`Successfully created diff range extension pack at ${packDir}.`,
|
||||||
"Cannot create diff range extension pack for diff-informed queries; " +
|
);
|
||||||
"reverting to performing full analysis.",
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
logger.info(
|
|
||||||
`Successfully created diff range extension pack at ${packDir}.`,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return packDir;
|
return packDir;
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
@@ -314,18 +307,13 @@ extensions:
|
|||||||
* @param ranges The file line ranges, as returned by
|
* @param ranges The file line ranges, as returned by
|
||||||
* `getPullRequestEditedDiffRanges`.
|
* `getPullRequestEditedDiffRanges`.
|
||||||
* @param checkoutPath The path at which the repository was checked out.
|
* @param checkoutPath The path at which the repository was checked out.
|
||||||
* @returns The absolute path of the directory containing the extension pack, or
|
* @returns The absolute path of the directory containing the extension pack.
|
||||||
* `undefined` if no extension pack was created.
|
|
||||||
*/
|
*/
|
||||||
function writeDiffRangeDataExtensionPack(
|
function writeDiffRangeDataExtensionPack(
|
||||||
logger: Logger,
|
logger: Logger,
|
||||||
ranges: DiffThunkRange[] | undefined,
|
ranges: DiffThunkRange[],
|
||||||
checkoutPath: string,
|
checkoutPath: string,
|
||||||
): string | undefined {
|
): string {
|
||||||
if (ranges === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ranges.length === 0) {
|
if (ranges.length === 0) {
|
||||||
// An empty diff range means that there are no added or modified lines in
|
// An empty diff range means that there are no added or modified lines in
|
||||||
// the pull request. But the `restrictAlertsTo` extensible predicate
|
// the pull request. But the `restrictAlertsTo` extensible predicate
|
||||||
|
|||||||
Reference in New Issue
Block a user