diff --git a/lib/main.js b/lib/main.js index 8aeed1bf..194af6a2 100644 --- a/lib/main.js +++ b/lib/main.js @@ -17,7 +17,6 @@ var __importStar = (this && this.__importStar) || function (mod) { }; Object.defineProperty(exports, "__esModule", { value: true }); const core = __importStar(require("@actions/core")); -const crypto = __importStar(require("crypto")); const exec = __importStar(require("@actions/exec")); const io = __importStar(require("@actions/io")); const actions_secret_parser_1 = require("actions-secret-parser"); @@ -30,7 +29,7 @@ function main() { try { // Set user agent variable var isAzCLISuccess = false; - let usrAgentRepo = crypto.createHash('sha256').update(`${process.env.GITHUB_REPOSITORY}`).digest('hex'); + let usrAgentRepo = `${process.env.GITHUB_REPOSITORY}`; let actionName = 'AzureLogin'; let userAgentString = (!!prefix ? `${prefix}+` : '') + `GITHUBACTIONS/${actionName}@v1_${usrAgentRepo}`; let azurePSHostEnv = (!!azPSHostEnv ? `${azPSHostEnv}+` : '') + `GITHUBACTIONS/${actionName}@v1_${usrAgentRepo}`; diff --git a/src/main.ts b/src/main.ts index cbe0b20e..cd355f0e 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,5 +1,4 @@ import * as core from '@actions/core'; -import * as crypto from "crypto"; import * as exec from '@actions/exec'; import * as io from '@actions/io'; @@ -14,7 +13,7 @@ async function main() { try { // Set user agent variable var isAzCLISuccess = false; - let usrAgentRepo = crypto.createHash('sha256').update(`${process.env.GITHUB_REPOSITORY}`).digest('hex'); + let usrAgentRepo = `${process.env.GITHUB_REPOSITORY}`; let actionName = 'AzureLogin'; let userAgentString = (!!prefix ? `${prefix}+` : '') + `GITHUBACTIONS/${actionName}@v1_${usrAgentRepo}`; let azurePSHostEnv = (!!azPSHostEnv ? `${azPSHostEnv}+` : '') + `GITHUBACTIONS/${actionName}@v1_${usrAgentRepo}`; @@ -69,4 +68,4 @@ async function executeAzCliCommand(command: string, silent?: boolean) { } } -main(); \ No newline at end of file +main();