Skip to content

Commit 1536153

Browse files
authored
Merge pull request #45250 from github/repo-sync
Repo sync
2 parents f455adb + 7d1536b commit 1536153

122 files changed

Lines changed: 10606 additions & 7244 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/auto-add-ready-for-doc-review.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,11 @@ jobs:
2727
- name: Check out repo
2828
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
2929

30-
- name: Generate GitHub App token
31-
id: app-token
32-
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
33-
with:
34-
app-id: ${{ secrets.DOCS_BOT_APP_ID }}
35-
private-key: ${{ secrets.DOCS_BOT_APP_PRIVATE_KEY }}
36-
3730
- name: Check team membership
3831
id: membership_check
3932
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
4033
with:
41-
github-token: ${{ steps.app-token.outputs.token }}
34+
github-token: ${{ secrets.DOCS_BOT_PAT_BASE }}
4235
script: |
4336
try {
4437
await github.rest.teams.getMembershipForUserInOrg({
@@ -55,7 +48,7 @@ jobs:
5548
- name: Add ready-for-doc-review label
5649
if: steps.membership_check.outputs.result == 'false'
5750
env:
58-
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
51+
GITHUB_TOKEN: ${{ secrets.DOCS_BOT_PAT_BASE }}
5952
PR_URL: ${{ github.event.pull_request.html_url }}
6053
run: |
6154
gh pr edit $PR_URL --add-label ready-for-doc-review

.github/workflows/benchmark-pages.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,6 @@ jobs:
2424
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
2525
with:
2626
persist-credentials: 'false'
27-
- name: Generate GitHub App token
28-
id: app-token
29-
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
30-
with:
31-
app-id: ${{ secrets.DOCS_BOT_APP_ID }}
32-
private-key: ${{ secrets.DOCS_BOT_APP_PRIVATE_KEY }}
33-
owner: github
34-
repositories: docs-engineering
35-
3627
- uses: ./.github/actions/node-npm-setup
3728

3829
- name: Build
@@ -58,7 +49,7 @@ jobs:
5849
- name: Check results and create issue if needed
5950
if: always()
6051
env:
61-
GH_TOKEN: ${{ steps.app-token.outputs.token }}
52+
GH_TOKEN: ${{ secrets.DOCS_BOT_PAT_BASE }}
6253
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
6354
run: |
6455
echo "Reading benchmark results..."
@@ -174,4 +165,4 @@ jobs:
174165
- uses: ./.github/actions/create-workflow-failure-issue
175166
if: ${{ failure() && github.event_name != 'workflow_dispatch' }}
176167
with:
177-
token: ${{ steps.app-token.outputs.token }}
168+
token: ${{ secrets.DOCS_BOT_PAT_BASE }}

.github/workflows/changelog-agent.yml

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -45,20 +45,11 @@ jobs:
4545
)
4646
runs-on: ubuntu-latest
4747
steps:
48-
- name: Generate GitHub App token
49-
id: app-token
50-
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
51-
with:
52-
app-id: ${{ secrets.DOCS_BOT_APP_ID }}
53-
private-key: ${{ secrets.DOCS_BOT_APP_PRIVATE_KEY }}
54-
owner: github
55-
repositories: docs-internal,docs-content,docs-engineering
56-
5748
- name: Resolve PR data
5849
id: resolve_pr
5950
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
6051
with:
61-
github-token: ${{ steps.app-token.outputs.token }}
52+
github-token: ${{ secrets.DOCS_BOT_PAT_BASE }}
6253
script: |
6354
let pr;
6455
if (context.eventName === 'workflow_dispatch') {
@@ -86,7 +77,7 @@ jobs:
8677
id: check_team
8778
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
8879
with:
89-
github-token: ${{ steps.app-token.outputs.token }}
80+
github-token: ${{ secrets.DOCS_BOT_PAT_BASE }}
9081
script: |
9182
const author = '${{ steps.resolve_pr.outputs.pr_author }}';
9283
@@ -124,7 +115,7 @@ jobs:
124115
env:
125116
PR_BODY: ${{ steps.resolve_pr.outputs.pr_body }}
126117
with:
127-
github-token: ${{ steps.app-token.outputs.token }}
118+
github-token: ${{ secrets.DOCS_BOT_PAT_BASE }}
128119
script: |
129120
const body = process.env.PR_BODY || '';
130121
@@ -159,7 +150,7 @@ jobs:
159150
id: check_parent
160151
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
161152
with:
162-
github-token: ${{ steps.app-token.outputs.token }}
153+
github-token: ${{ secrets.DOCS_BOT_PAT_BASE }}
163154
script: |
164155
const issueNumber = parseInt('${{ steps.extract_issue.outputs.issue_number }}', 10);
165156
@@ -240,7 +231,7 @@ jobs:
240231
PR_BODY: ${{ steps.resolve_pr.outputs.pr_body }}
241232
PR_URL: ${{ steps.resolve_pr.outputs.pr_url }}
242233
with:
243-
github-token: ${{ steps.app-token.outputs.token }}
234+
github-token: ${{ secrets.DOCS_BOT_PAT_BASE }}
244235
script: |
245236
const prNumber = parseInt('${{ steps.resolve_pr.outputs.pr_number }}', 10);
246237
const prAuthor = '${{ steps.resolve_pr.outputs.pr_author }}';
@@ -281,7 +272,7 @@ jobs:
281272
id: check_existing
282273
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
283274
with:
284-
github-token: ${{ steps.app-token.outputs.token }}
275+
github-token: ${{ secrets.DOCS_BOT_PAT_BASE }}
285276
script: |
286277
const branchName = `changelog-agent-${{ steps.resolve_pr.outputs.pr_number }}`;
287278
const { data: pulls } = await github.rest.pulls.list({
@@ -304,7 +295,7 @@ jobs:
304295
id: read_examples
305296
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
306297
with:
307-
github-token: ${{ steps.app-token.outputs.token }}
298+
github-token: ${{ secrets.DOCS_BOT_PAT_BASE }}
308299
script: |
309300
// Fetch changelog-internal.md from docs-content
310301
const { data } = await github.rest.repos.getContent({
@@ -474,7 +465,7 @@ jobs:
474465
PARENT_AUTHOR: ${{ steps.check_parent.outputs.parent_author }}
475466
PARENT_ASSIGNEES: ${{ steps.check_parent.outputs.parent_assignees }}
476467
with:
477-
github-token: ${{ steps.app-token.outputs.token }}
468+
github-token: ${{ secrets.DOCS_BOT_PAT_BASE }}
478469
script: |
479470
const branchName = `changelog-agent-${{ steps.resolve_pr.outputs.pr_number }}`;
480471
const filePath = 'docs-content-docs/docs-content-workflows/changelog-internal.md';
@@ -635,7 +626,7 @@ jobs:
635626
PARENT_AUTHOR: ${{ steps.check_parent.outputs.parent_author }}
636627
PARENT_ASSIGNEES: ${{ steps.check_parent.outputs.parent_assignees }}
637628
with:
638-
github-token: ${{ steps.app-token.outputs.token }}
629+
github-token: ${{ secrets.DOCS_BOT_PAT_BASE }}
639630
script: |
640631
const author = process.env.PR_AUTHOR;
641632
const changelogPrUrl = process.env.CHANGELOG_PR_URL;
@@ -730,7 +721,7 @@ jobs:
730721
if: steps.create_pr.outputs.changelog_pr_url != '' && inputs.dry_run != true
731722
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
732723
with:
733-
github-token: ${{ steps.app-token.outputs.token }}
724+
github-token: ${{ secrets.DOCS_BOT_PAT_BASE }}
734725
script: |
735726
const changelogPrUrl = '${{ steps.create_pr.outputs.changelog_pr_url }}';
736727
await github.rest.issues.createComment({
@@ -753,4 +744,4 @@ jobs:
753744
- uses: ./.github/actions/create-workflow-failure-issue
754745
if: ${{ failure() && github.event_name != 'workflow_dispatch' }}
755746
with:
756-
token: ${{ steps.app-token.outputs.token }}
747+
token: ${{ secrets.DOCS_BOT_PAT_BASE }}

.github/workflows/changelog-prompt.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,11 @@ jobs:
1818
runs-on: ubuntu-latest
1919

2020
steps:
21-
- name: Generate GitHub App token
22-
id: app-token
23-
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
24-
with:
25-
app-id: ${{ secrets.DOCS_BOT_APP_ID }}
26-
private-key: ${{ secrets.DOCS_BOT_APP_PRIVATE_KEY }}
27-
2821
- name: Check if PR author is in docs-content team
2922
id: check_team
3023
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
3124
with:
32-
github-token: ${{ steps.app-token.outputs.token }}
25+
github-token: ${{ secrets.DOCS_BOT_PAT_BASE }}
3326
script: |
3427
try {
3528
const pr = context.payload.pull_request;
@@ -50,7 +43,7 @@ jobs:
5043

5144
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
5245
with:
53-
github-token: ${{ steps.app-token.outputs.token }}
46+
github-token: ${{ secrets.DOCS_BOT_PAT_BASE }}
5447
script: |
5548
// Get PR author username
5649
const pr = context.payload.pull_request;

.github/workflows/check-for-spammy-issues.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,9 @@ jobs:
1717
if: github.repository == 'github/docs'
1818
runs-on: ubuntu-latest
1919
steps:
20-
- name: Generate GitHub App token
21-
id: app-token
22-
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
23-
with:
24-
app-id: ${{ secrets.DOCS_BOT_APP_ID }}
25-
private-key: ${{ secrets.DOCS_BOT_APP_PRIVATE_KEY }}
26-
2720
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3
2821
with:
29-
github-token: ${{ steps.app-token.outputs.token }}
22+
github-token: ${{ secrets.DOCS_BOT_PAT_BASE }}
3023
script: |
3124
3225
const issue = context.payload.issue

.github/workflows/close-bad-repo-sync-prs.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,10 @@ jobs:
2121
name: Close if invalid repo-sync PR author
2222
runs-on: ubuntu-latest
2323
steps:
24-
- name: Generate GitHub App token
25-
id: app-token
26-
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
27-
with:
28-
app-id: ${{ secrets.DOCS_BOT_APP_ID }}
29-
private-key: ${{ secrets.DOCS_BOT_APP_PRIVATE_KEY }}
30-
3124
- name: Close pull request if unwanted
3225
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3
3326
with:
34-
github-token: ${{ steps.app-token.outputs.token }}
27+
github-token: ${{ secrets.DOCS_BOT_PAT_BASE }}
3528
script: |
3629
const { owner, repo } = context.repo
3730
const prCreator = context.actor

.github/workflows/codeql.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,7 @@ jobs:
4242
with:
4343
slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}
4444

45-
- name: Generate GitHub App token
46-
if: ${{ failure() && github.event_name != 'pull_request' }}
47-
id: app-token
48-
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
49-
with:
50-
app-id: ${{ secrets.DOCS_BOT_APP_ID }}
51-
private-key: ${{ secrets.DOCS_BOT_APP_PRIVATE_KEY }}
52-
owner: github
53-
repositories: docs-engineering
54-
5545
- uses: ./.github/actions/create-workflow-failure-issue
5646
if: ${{ failure() && github.event_name != 'pull_request' }}
5747
with:
58-
token: ${{ steps.app-token.outputs.token }}
48+
token: ${{ secrets.DOCS_BOT_PAT_BASE }}

.github/workflows/confirm-internal-staff-work-in-docs.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,12 @@ jobs:
2323
continue-on-error: true
2424
if: github.repository == 'github/docs' && github.actor != 'docs-bot'
2525
steps:
26-
- name: Generate GitHub App token
27-
id: app-token
28-
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
29-
with:
30-
app-id: ${{ secrets.DOCS_BOT_APP_ID }}
31-
private-key: ${{ secrets.DOCS_BOT_APP_PRIVATE_KEY }}
32-
owner: github
33-
repositories: ${{ secrets.TEAM_CONTENT_REPO }}
34-
3526
- id: membership_check
3627
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3
3728
env:
3829
TEAM_CONTENT_REPO: ${{ secrets.TEAM_CONTENT_REPO }}
3930
with:
40-
github-token: ${{ steps.app-token.outputs.token }}
31+
github-token: ${{ secrets.DOCS_BOT_PAT_BASE }}
4132
script: |
4233
// Only perform this action with GitHub employees
4334
try {

.github/workflows/content-pipelines.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,6 @@ jobs:
4545

4646
- uses: ./.github/actions/node-npm-setup
4747

48-
- name: Generate GitHub App token
49-
id: app-token
50-
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
51-
with:
52-
app-id: ${{ secrets.DOCS_BOT_APP_ID }}
53-
private-key: ${{ secrets.DOCS_BOT_APP_PRIVATE_KEY }}
54-
owner: github
55-
repositories: docs-internal,copilot-cli-generated-docs,docs-engineering
56-
5748
- name: Install Copilot CLI
5849
run: npm install -g @github/copilot@prerelease
5950

@@ -101,7 +92,7 @@ jobs:
10192
10293
- name: Run content pipeline update script
10394
env:
104-
GH_TOKEN: ${{ steps.app-token.outputs.token }}
95+
GH_TOKEN: ${{ secrets.DOCS_BOT_PAT_BASE }}
10596
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10697
COPILOT_GITHUB_TOKEN: ${{ secrets.DOCS_BOT_PAT_COPILOT }}
10798
run: npx tsx src/content-pipelines/scripts/update.ts --id "${{ matrix.id }}"
@@ -149,7 +140,7 @@ jobs:
149140
- name: Create or update PR
150141
if: steps.commit.outputs.has_changes == 'true'
151142
env:
152-
GH_TOKEN: ${{ steps.app-token.outputs.token }}
143+
GH_TOKEN: ${{ secrets.DOCS_BOT_PAT_BASE }}
153144
UPDATE_BRANCH: ${{ steps.branch.outputs.update_branch }}
154145
PIPELINE_ID: ${{ matrix.id }}
155146
SOURCE_REPO: ${{ steps.source-info.outputs.source_repo }}
@@ -204,4 +195,4 @@ jobs:
204195
- uses: ./.github/actions/create-workflow-failure-issue
205196
if: ${{ failure() && github.event_name != 'workflow_dispatch' }}
206197
with:
207-
token: ${{ steps.app-token.outputs.token }}
198+
token: ${{ secrets.DOCS_BOT_PAT_BASE }}

.github/workflows/copilot-setup-steps.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,27 +30,18 @@ jobs:
3030
steps:
3131
- name: Checkout code
3232
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
33-
- name: Generate GitHub App token
34-
id: app-token
35-
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
36-
with:
37-
app-id: ${{ secrets.DOCS_BOT_APP_ID }}
38-
private-key: ${{ secrets.DOCS_BOT_APP_PRIVATE_KEY }}
39-
owner: github
40-
repositories: docs-early-access
41-
4233
- uses: ./.github/actions/node-npm-setup
4334

4435
# Search and language test suites require a running Elasticsearch instance.
4536
- uses: ./.github/actions/setup-elasticsearch
4637
with:
47-
token: ${{ steps.app-token.outputs.token }}
38+
token: ${{ secrets.DOCS_BOT_PAT_BASE }}
4839

4940
# docs-internal has early-access content that must be fetched separately.
5041
- uses: ./.github/actions/get-docs-early-access
5142
if: ${{ github.repository == 'github/docs-internal' }}
5243
with:
53-
token: ${{ steps.app-token.outputs.token }}
44+
token: ${{ secrets.DOCS_BOT_PAT_BASE }}
5445

5546
# Many test suites depend on Next.js build artifacts.
5647
- name: Build

0 commit comments

Comments
 (0)