Merge pull request #3181 from github/nora/adjust-log-messages

Remove ambiguity from 'View logs' messages
This commit is contained in:
Nora
2024-01-03 10:53:47 +01:00
committed by GitHub
6 changed files with 10 additions and 10 deletions

View File

@@ -63,7 +63,7 @@ export class OutputChannelLogger
message: string,
show: (message: string, ...items: string[]) => Thenable<string | undefined>,
): Promise<void> {
const label = "Show Log";
const label = "View extension logs";
const result = await show(message, label);
if (result === label) {

View File

@@ -70,8 +70,8 @@ ErrorExample.args = {
<>
Request to
https://api.github.com/repos/octodemo/Hello-World/code-scanning/codeql/queries
failed. <VSCodeLink>Check logs</VSCodeLink> and try running this query
again.
failed. <VSCodeLink>View actions logs</VSCodeLink> and try running this
query again.
</>
),
};
@@ -84,7 +84,7 @@ ErrorWithButtons.args = {
"Request to https://api.github.com/repos/octodemo/Hello-World/code-scanning/codeql/queries failed. Try running this query again.",
actions: (
<>
<VSCodeButton appearance="secondary">View logs</VSCodeButton>
<VSCodeButton appearance="secondary">View actions logs</VSCodeButton>
<VSCodeButton>Retry</VSCodeButton>
</>
),

View File

@@ -33,8 +33,8 @@ const getMessage = (failureReason: VariantAnalysisFailureReason): ReactNode => {
return (
<>
The GitHub Actions workflow run has failed.{" "}
<VSCodeLink onClick={openLogs}>Check logs</VSCodeLink> and try running
this query again.
<VSCodeLink onClick={openLogs}>View actions logs</VSCodeLink> and try
running this query again.
</>
);
case VariantAnalysisFailureReason.InternalError:

View File

@@ -36,7 +36,7 @@ export const VariantAnalysisStatusStats = ({
<span>{completedAt !== undefined ? formatDate(completedAt) : "-"}</span>
)}
{onViewLogsClick && (
<VSCodeLink onClick={onViewLogsClick}>View logs</VSCodeLink>
<VSCodeLink onClick={onViewLogsClick}>View actions logs</VSCodeLink>
)}
</Container>
);

View File

@@ -146,7 +146,7 @@ describe(VariantAnalysisStats.name, () => {
completedAt: new Date(),
});
await userEvent.click(screen.getByText("View logs"));
await userEvent.click(screen.getByText("View actions logs"));
expect(onViewLogsClick).toHaveBeenCalledTimes(1);
});

View File

@@ -53,7 +53,7 @@ describe(VariantAnalysisStatusStats.name, () => {
onViewLogsClick: () => undefined,
});
expect(screen.getByText("View logs")).toBeInTheDocument();
expect(screen.getByText("View actions logs")).toBeInTheDocument();
});
it("renders when there isn't a viewLogs links", () => {
@@ -62,6 +62,6 @@ describe(VariantAnalysisStatusStats.name, () => {
onViewLogsClick: undefined,
});
expect(screen.queryByText("View logs")).not.toBeInTheDocument();
expect(screen.queryByText("View actions logs")).not.toBeInTheDocument();
});
});