Skip to content

Commit d5b3d42

Browse files
committed
Inline EnvVar.ANALYSIS_KEY in getAnalysisKey
1 parent 417a8c2 commit d5b3d42

10 files changed

+20
-31
lines changed

lib/analyze-action.js

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

lib/autobuild-action.js

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

lib/init-action-post.js

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

lib/init-action.js

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

lib/resolve-environment-action.js

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

lib/setup-codeql-action.js

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

lib/start-proxy-action.js

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

lib/upload-lib.js

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

lib/upload-sarif-action.js

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

src/api-client.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,7 @@ export async function getWorkflowRelativePath(): Promise<string> {
190190
* the GitHub API, but after that the result will be cached.
191191
*/
192192
export async function getAnalysisKey(): Promise<string> {
193-
const analysisKeyEnvVar = EnvVar.ANALYSIS_KEY;
194-
195-
let analysisKey = process.env[analysisKeyEnvVar];
193+
let analysisKey = process.env[EnvVar.ANALYSIS_KEY];
196194
if (analysisKey !== undefined) {
197195
return analysisKey;
198196
}
@@ -201,7 +199,7 @@ export async function getAnalysisKey(): Promise<string> {
201199
const jobName = getRequiredEnvParam("GITHUB_JOB");
202200

203201
analysisKey = `${workflowPath}:${jobName}`;
204-
core.exportVariable(analysisKeyEnvVar, analysisKey);
202+
core.exportVariable(EnvVar.ANALYSIS_KEY, analysisKey);
205203
return analysisKey;
206204
}
207205

0 commit comments

Comments
 (0)