File tree Expand file tree Collapse file tree 5 files changed +17
-7
lines changed Expand file tree Collapse file tree 5 files changed +17
-7
lines changed Original file line number Diff line number Diff line change 21
21
pool : pool-windows-2019
22
22
steps :
23
23
- checkout : self
24
- - template : util/get-github-pat-steps.yml
24
+ persistCredentials : true
25
+ - template : util/get-github-token-steps.yml
25
26
- task : NodeTool@0
26
27
displayName : Use Node 14.15.5
27
28
inputs :
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ parameters:
5
5
IsGenerateBased : ' '
6
6
7
7
steps :
8
- - template : get-github-pat-steps.yml
9
8
- template : download-build-steps.yml
10
9
parameters :
11
10
artifactName : build-${{ parameters.testFramework }}
50
49
custom : msbuild
51
50
arguments : ' build.proj /t:GenerateHelp /p:Configuration=${{ parameters.configuration }};PullRequestNumber=$(System.PullRequest.PullRequestNumber)'
52
51
env :
53
- OCTOKITPAT : $(GithubToken)
54
52
PowerShellPlatform : ${{ parameters.powerShellPlatform }}
55
53
56
54
- task : DotNetCoreCLI@2
60
58
custom : msbuild
61
59
arguments : ' build.proj /t:StaticAnalysis /p:Configuration=${{ parameters.configuration }};PullRequestNumber=$(System.PullRequest.PullRequestNumber)'
62
60
env :
63
- OCTOKITPAT : $(GithubToken)
64
61
IsGenerateBased : ${{ parameters.IsGenerateBased }}
65
62
66
63
- template : publish-artifacts-steps.yml
Original file line number Diff line number Diff line change @@ -4,7 +4,9 @@ parameters:
4
4
powerShellPlatform : ' '
5
5
6
6
steps :
7
- - template : get-github-pat-steps.yml
7
+ - checkout : self
8
+ persistCredentials : true
9
+ - template : get-github-token-steps.yml
8
10
- task : NodeTool@0
9
11
condition : eq(variables.IsGenerateBased, true)
10
12
displayName : Install Autorest
Original file line number Diff line number Diff line change
1
+ steps :
2
+ - task : PowerShell@2
3
+ displayName : Get GitHub Token
4
+ inputs :
5
+ targetType : ' inline'
6
+ script : |
7
+ $httpConfigs = (git config --get-regexp "http" )
8
+ $authConfig = $httpConfigs | Where-Object {$_ -like "*AUTHORIZATION*"}
9
+ $token = ($authConfig -split ' ')[-1]
10
+ $ghToken = ([System.Text.Encoding]::ASCII.GetString([System.Convert]::FromBase64String($token)) -split ':')[1]
11
+ Write-Host "##vso[task.setvariable variable=GithubToken;issecret=true]$ghToken"
12
+
Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ parameters:
6
6
powerShellPlatform : ' '
7
7
8
8
steps :
9
- - template : get-github-pat-steps.yml
10
9
- template : download-build-steps.yml
11
10
parameters :
12
11
artifactName : build-${{ parameters.testFramework }}
31
30
custom : msbuild
32
31
arguments : ' build.proj /t:${{ parameters.testTarget }} /p:Configuration=${{ parameters.configuration }};TestFramework=${{ parameters.testFramework }};PullRequestNumber=$(System.PullRequest.PullRequestNumber)'
33
32
env :
34
- OCTOKITPAT : $(GithubToken)
35
33
PowerShellPlatform : ${{ parameters.powerShellPlatform }}
36
34
continueOnError : true
37
35
You can’t perform that action at this time.
0 commit comments