Skip to content

Commit 23a0098

Browse files
committed
fix: improve error handling and logging for diff range path resolution
1 parent d5bb39f commit 23a0098

11 files changed

+169
-26
lines changed

lib/analyze-action-post.js

Lines changed: 15 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/analyze-action.js

Lines changed: 15 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/autobuild-action.js

Lines changed: 15 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/init-action-post.js

Lines changed: 15 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/init-action.js

Lines changed: 23 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/resolve-environment-action.js

Lines changed: 15 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/setup-codeql-action.js

Lines changed: 15 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/upload-lib.js

Lines changed: 15 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/upload-sarif-action.js

Lines changed: 15 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/init-action.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -849,8 +849,8 @@ async function computeAndPersistDiffRanges(
849849
features: FeatureEnablement,
850850
logger: Logger,
851851
): Promise<void> {
852-
try {
853-
await withGroupAsync("Compute PR diff ranges", async () => {
852+
await withGroupAsync("Computing PR diff ranges", async () => {
853+
try {
854854
const branches = await getDiffInformedAnalysisBranches(
855855
codeql,
856856
features,
@@ -868,12 +868,12 @@ async function computeAndPersistDiffRanges(
868868
logger.info(
869869
`Persisted ${ranges.length} diff range(s) across ${distinctFiles} file(s).`,
870870
);
871-
});
872-
} catch (e) {
873-
logger.warning(
874-
`Failed to compute and persist PR diff ranges: ${getErrorMessage(e)}`,
875-
);
876-
}
871+
} catch (e) {
872+
logger.warning(
873+
`Failed to compute and persist PR diff ranges: ${getErrorMessage(e)}`,
874+
);
875+
}
876+
});
877877
}
878878
async function recordZstdAvailability(
879879
config: configUtils.Config,

0 commit comments

Comments
 (0)