Skip to content

Commit e766a21

Browse files
committed
Copilot PR feedback
1 parent 1aa0b82 commit e766a21

4 files changed

Lines changed: 7 additions & 5 deletions

File tree

src/github/githubRepository.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -981,7 +981,7 @@ export class GitHubRepository extends Disposable {
981981
job_id: checkRunDatabaseId,
982982
});
983983
Logger.debug(`Fetch check run logs via Actions API - done`, this.id);
984-
return result.data as unknown as string;
984+
return result.data as string;
985985
} catch {
986986
// Not a GitHub Actions job - fall through to Checks API
987987
}

src/view/checkRunLogContentProvider.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import * as vscode from 'vscode';
77
import Logger from '../common/logger';
88
import { Schemes } from '../common/uri';
9+
import { formatError } from '../common/utils';
910
import { RepositoriesManager } from '../github/repositoriesManager';
1011

1112
interface CheckRunLogParams {
@@ -51,8 +52,8 @@ export class CheckRunLogContentProvider implements vscode.TextDocumentContentPro
5152
try {
5253
return await repo.getCheckRunLogs(params.checkRunDatabaseId);
5354
} catch (e) {
54-
Logger.error(`Failed to fetch check run logs: ${e}`, 'CheckRunLog');
55-
return `Failed to fetch check run logs: ${e}`;
55+
Logger.error(`Failed to fetch check run logs: ${formatError(e)}`, 'CheckRunLog');
56+
return `Failed to fetch check run logs. See logs for details.`;
5657
}
5758
}
5859
}

webviews/common/context.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ export class PRContext {
363363

364364
public viewCheckLogs = (status: PullRequestCheckStatus) => this.postMessage({ command: 'pr.view-check-logs', args: { status } });
365365

366-
public openCommitChanges = async (commitSha: string) => {
366+
public openCommitChanges = async (commitSha: string) => {
367367
this.updatePR({ loadingCommit: commitSha });
368368
try {
369369
const args: OpenCommitChangesArgs = { commitSha };

webviews/editorWebview/index.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,8 @@ body .comment-container .review-comment-header {
239239
display: flex;
240240
align-items: center;
241241
gap: 4px;
242-
}
242+
}
243+
243244
.view-check-logs-placeholder {
244245
width: 20px;
245246
}

0 commit comments

Comments
 (0)