diff --git a/.azure-pipelines/code-gen.yml b/.azure-pipelines/code-gen.yml index 4dbc8b89efae..b00c6008fe8f 100644 --- a/.azure-pipelines/code-gen.yml +++ b/.azure-pipelines/code-gen.yml @@ -21,8 +21,7 @@ jobs: pool: pool-windows-2019 steps: - checkout: self - persistCredentials: true - - template: util/get-github-token-steps.yml + - template: util/get-github-pat-steps.yml - task: NodeTool@0 displayName: Use Node 14.15.5 inputs: diff --git a/.azure-pipelines/util/get-github-token-steps.yml b/.azure-pipelines/util/get-github-token-steps.yml deleted file mode 100644 index 7e3884196ea2..000000000000 --- a/.azure-pipelines/util/get-github-token-steps.yml +++ /dev/null @@ -1,12 +0,0 @@ -steps: -- task: PowerShell@2 - displayName: Get GitHub Token - inputs: - targetType: 'inline' - script: | - $httpConfigs = (git config --get-regexp "http" ) - $authConfig = $httpConfigs | Where-Object {$_ -like "*AUTHORIZATION*"} - $token = ($authConfig -split ' ')[-1] - $ghToken = ([System.Text.Encoding]::ASCII.GetString([System.Convert]::FromBase64String($token)) -split ':')[1] - Write-Host "##vso[task.setvariable variable=GithubToken;issecret=true]$ghToken" -