Skip to content

Commit 99576d5

Browse files
committed
Fix broken log grouping due to nested log group
1 parent 9fc351a commit 99576d5

2 files changed

Lines changed: 19 additions & 21 deletions

File tree

lib/entry-points.js

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

src/diff-informed-analysis-utils.ts

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type { PullRequestBranches } from "./actions-util";
55
import { getApiClient, getGitHubVersion } from "./api-client";
66
import type { CodeQL } from "./codeql";
77
import { Feature, FeatureEnablement } from "./feature-flags";
8-
import { Logger, withGroupAsync } from "./logging";
8+
import { Logger } from "./logging";
99
import { getRepositoryNwoFromEnv } from "./repository";
1010
import { getErrorMessage, GitHubVariant, satisfiesGHESVersion } from "./util";
1111

@@ -83,16 +83,14 @@ export async function prepareDiffInformedAnalysis(
8383
return false;
8484
}
8585

86-
return await withGroupAsync("Computing PR diff ranges", async () => {
87-
try {
88-
return await computeAndPersistDiffRanges(branches, logger);
89-
} catch (e) {
90-
logger.warning(
91-
`Failed to compute diff-informed analysis ranges: ${getErrorMessage(e)}`,
92-
);
93-
return false;
94-
}
95-
});
86+
try {
87+
return await computeAndPersistDiffRanges(branches, logger);
88+
} catch (e) {
89+
logger.warning(
90+
`Failed to compute diff-informed analysis ranges: ${getErrorMessage(e)}`,
91+
);
92+
return false;
93+
}
9694
}
9795

9896
export interface DiffThunkRange {
@@ -192,6 +190,7 @@ export async function computeAndPersistDiffRanges(
192190
branches: PullRequestBranches,
193191
logger: Logger,
194192
): Promise<boolean> {
193+
logger.info("Computing PR diff ranges...");
195194
const ranges = await getPullRequestEditedDiffRanges(branches, logger);
196195
if (ranges === undefined) {
197196
return false;

0 commit comments

Comments
 (0)