Skip to content

Commit 19fe854

Browse files
committed
Remove intermediate variables
1 parent c2377b2 commit 19fe854

3 files changed

Lines changed: 10 additions & 29 deletions

File tree

lib/upload-lib.js

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

lib/upload-lib.js.map

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

src/upload-lib.ts

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -109,27 +109,16 @@ export async function uploadFromActions(
109109
apiDetails: api.GitHubApiDetails,
110110
logger: Logger
111111
): Promise<UploadStatusReport> {
112-
const repositoryNwo = parseRepositoryNwo(
113-
actionsUtil.getRequiredEnvParam("GITHUB_REPOSITORY")
114-
);
115-
const commitOid = await actionsUtil.getCommitOid();
116-
const ref = await actionsUtil.getRef();
117-
const analysisKey = await actionsUtil.getAnalysisKey();
118-
const analysisName = actionsUtil.getRequiredEnvParam("GITHUB_WORKFLOW");
119-
const workflowRunID = actionsUtil.getWorkflowRunID();
120-
const checkoutPath = actionsUtil.getRequiredInput("checkout_path");
121-
const environment = actionsUtil.getRequiredInput("matrix");
122-
123112
return await uploadFiles(
124113
getSarifFilePaths(sarifPath),
125-
repositoryNwo,
126-
commitOid,
127-
ref,
128-
analysisKey,
129-
analysisName,
130-
workflowRunID,
131-
checkoutPath,
132-
environment,
114+
parseRepositoryNwo(actionsUtil.getRequiredEnvParam("GITHUB_REPOSITORY")),
115+
await actionsUtil.getCommitOid(),
116+
await actionsUtil.getRef(),
117+
await actionsUtil.getAnalysisKey(),
118+
actionsUtil.getRequiredEnvParam("GITHUB_WORKFLOW"),
119+
actionsUtil.getWorkflowRunID(),
120+
actionsUtil.getRequiredInput("checkout_path"),
121+
actionsUtil.getRequiredInput("matrix"),
133122
gitHubVersion,
134123
apiDetails,
135124
"actions",

0 commit comments

Comments
 (0)