Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Henry Mercer <henry.mercer@me.com>
  • Loading branch information
Michael B. Gale and Henry Mercer committed Jun 13, 2023
1 parent ef4bf4a commit 8e75e1a
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/__resolve-environment-action.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/codeql.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions lib/resolve-environment-action.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/resolve-environment-action.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions lib/resolve-environment.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pr-checks/checks/resolve-environment-action.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "resolve-environment-action"
name: "Resolve environment"
description: "Tests that the resolve-environment action works for Go"
versions: ["nightly-latest"]
steps:
Expand Down
1 change: 0 additions & 1 deletion src/codeql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ export interface ResolveQueriesOutput {
export interface ResolveBuildEnvironmentOutput {
configuration?: {
[language: string]: {
os?: unknown;
[key: string]: unknown;
};
};
Expand Down
7 changes: 5 additions & 2 deletions src/resolve-environment-action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import * as core from "@actions/core";

import {
createStatusReportBase,
getActionsStatus,
getOptionalInput,
getRequiredInput,
getTemporaryDirectory,
Expand Down Expand Up @@ -58,11 +59,13 @@ async function run() {
core.setOutput("environment", result);
} catch (unwrappedError) {
const error = wrapError(unwrappedError);
core.setFailed(error.message);
core.setFailed(
`Failed to resolve a build environment suitable for automatically building your code. ${error.message}`
);
await sendStatusReport(
await createStatusReportBase(
ACTION_NAME,
"aborted",
getActionsStatus(error),
startedAt,
error.message,
error.stack
Expand Down
4 changes: 2 additions & 2 deletions src/resolve-environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ export async function runResolveBuildEnvironment(
logger.startGroup(
`Attempting to resolve build environment for ${language} in ${workingDir}`
);
const codeQL = await getCodeQL(cmd);
const result = await codeQL.resolveBuildEnvironment(workingDir, language);
const codeql = await getCodeQL(cmd);
const result = await codeql.resolveBuildEnvironment(workingDir, language);
logger.endGroup();
return result;
}

0 comments on commit 8e75e1a

Please sign in to comment.