Skip to content

Commit f7db5b7

Browse files
Revert "Replace azuresdk-github-pat with GH_TOKEN in Azure pipeline YAML file…" (#44368)
This reverts commit ab08a9a.
1 parent 6ce2ed1 commit f7db5b7

2 files changed

Lines changed: 7 additions & 13 deletions

File tree

eng/pipelines/swagger-api-doc-preview.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,24 +32,21 @@ jobs:
3232
value: 'Swagger ApiDocPreview'
3333

3434
steps:
35-
- checkout: self
36-
# Fetch depth required to get list of changed files
37-
fetchDepth: 2
38-
39-
- template: /eng/common/pipelines/templates/steps/login-to-github.yml
40-
4135
- template: /eng/pipelines/templates/steps/set-sha-check.yml
4236
parameters:
4337
State: pending
4438
TargetUrl: $(CurrentBuildUrl)
4539
Description: 'Starting docs build'
4640
Context: $(StatusName)
47-
GitHubToken: $(GH_TOKEN)
41+
42+
- checkout: self
43+
# Fetch depth required to get list of changed files
44+
fetchDepth: 2
4845

4946
- template: /eng/common/pipelines/templates/steps/sparse-checkout.yml
5047
parameters:
5148
SkipCheckoutNone: true
52-
TokenToUseForAuth: $(GH_TOKEN)
49+
TokenToUseForAuth: $(azuresdk-github-pat)
5350
# Path does not need to be set because sparse-checkout.yml already
5451
# checks out files in the repo root
5552
Repositories:

eng/pipelines/templates/steps/set-sha-check.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,9 @@ parameters:
4242

4343
- name: GitHubToken
4444
type: string
45-
default: ''
45+
default: $(azuresdk-github-pat)
4646

4747
steps:
48-
- ${{ if eq(parameters.GitHubToken, '') }}:
49-
- template: /eng/common/pipelines/templates/steps/login-to-github.yml
50-
5148
- bash: |
5249
echo "Repository Name: ${{ parameters.RepositoryName }}"
5350
echo "Commit ID: ${{ parameters.Sha }}"
@@ -64,4 +61,4 @@ steps:
6461
displayName: ${{ parameters.DisplayName }}
6562
condition: ${{ parameters.Condition }}
6663
env:
67-
GH_TOKEN: $(GH_TOKEN)
64+
GH_TOKEN: ${{ parameters.GitHubToken }}

0 commit comments

Comments
 (0)