Skip to content

Commit ef9b03a

Browse files
committed
Merge branch 'main' of github.com:github/docs-internal into check-links-improvement-redux
2 parents 624245d + 1f15ea4 commit ef9b03a

2,850 files changed

Lines changed: 48969 additions & 9855 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/allowed-actions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ module.exports = [
2525
'pascalgn/automerge-action@c9bd182',
2626
'peter-evans/create-issue-from-file@a04ce672e3acedb1f8e416b46716ddfd09905326',
2727
'peter-evans/create-or-update-comment@5221bf4aa615e5c6e95bb142f9673a9c791be2cd',
28-
'peter-evans/create-pull-request@938e6aea6f8dbdaced2064e948cb806c77fe87b8',
28+
'peter-evans/create-pull-request@8c603dbb04b917a9fc2dd991dc54fef54b640b43',
2929
'rachmari/actions-add-new-issue-to-column@1a459ef92308ba7c9c9dc2fcdd72f232495574a9',
3030
'rachmari/labeler@832d42ec5523f3c6d46e8168de71cd54363e3e2e',
3131
'repo-sync/github-sync@3832fe8e2be32372e1b3970bbae8e7079edeec88',

.github/workflows/remove-unused-assets.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- name: Remove script results file
3434
run: rm -rf ./results.md
3535
- name: Create pull request
36-
uses: peter-evans/create-pull-request@938e6aea6f8dbdaced2064e948cb806c77fe87b8
36+
uses: peter-evans/create-pull-request@8c603dbb04b917a9fc2dd991dc54fef54b640b43
3737
with:
3838
# need to use a token with repo and workflow scopes for this step
3939
token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}

.github/workflows/repo-sync-stalls.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
const timeDelta = Date.now() - Date.parse(pr.created_at);
4141
const minutesOpen = timeDelta / 1000 / 60;
4242
43-
if (minutesOpen > 30) {
43+
if (minutesOpen > 180) {
4444
core.setFailed('Repo sync appears to be stalled')
4545
}
4646
})

.github/workflows/triage-unallowed-contributions.yml

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,24 @@
11
name: Check unallowed file changes
22

33
on:
4-
push:
4+
pull_request_target:
5+
paths:
6+
- '.github/workflows/**'
7+
- '.github/CODEOWNERS'
8+
- 'translations/**'
9+
- 'assets/fonts/**'
10+
- 'data/graphql/**'
11+
- 'lib/graphql/**'
12+
- 'lib/redirects/**'
13+
- 'lib/rest/**'
14+
- 'lib/webhooks/**'
515

616
jobs:
717
triage:
818
if: github.repository == 'github/docs' && github.event.pull_request.user.login != 'Octomerger'
919
runs-on: ubuntu-latest
1020
steps:
1121
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
12-
- name: Get pull request number
13-
id: pull-number
14-
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
15-
with:
16-
github-token: ${{secrets.GITHUB_TOKEN}}
17-
result-encoding: string
18-
script: |
19-
const pulls = await github.repos.listPullRequestsAssociatedWithCommit({
20-
...context.repo,
21-
commit_sha: context.sha
22-
})
23-
24-
return pulls.data.map(pull => pull.number).shift()
2522
- name: Check for existing requested changes
2623
id: requested-change
2724
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
@@ -31,13 +28,19 @@ jobs:
3128
script: |
3229
const pullReviews = await github.pulls.listReviews({
3330
...context.repo,
34-
pull_number: ${{steps.pull-number.outputs.result}}
31+
pull_number: context.payload.number
3532
})
3633
37-
return pullReviews.data
34+
const botReviews = pullReviews.data
3835
.filter(review => review.user.login === 'github-actions[bot]')
3936
.sort((a, b) => new Date(b.submitted_at) - new Date(a.submitted_at))
4037
.shift()
38+
39+
if (botReviews) {
40+
console.log(`Pull request reviews authored by the github-action bot: ${botReviews}`)
41+
}
42+
return botReviews
43+
4144
- name: Get files changed
4245
uses: dorny/paths-filter@eb75a1edc117d3756a18ef89958ee59f9500ba58
4346
id: filter
@@ -89,29 +92,31 @@ jobs:
8992
if (translationFiles.length > 0) {
9093
await github.issues.addLabels({
9194
...context.repo,
92-
issue_number: ${{steps.pull-number.outputs.result}},
95+
issue_number: context.payload.number,
9396
labels: ['localization']
9497
})
9598
reviewMessage += "\n\nIt looks like you've modified translated content. Unfortunately, we are not able to accept pull requests for translated content. Our translation process involves an integration with an external service at crowdin.com, where all translation activity happens. We hope to eventually open up the translation process to the open source community, but we're not there yet. See https://github.com/github/docs/blob/main/CONTRIBUTING.md#earth_asia-translations for more details."
9699
}
97100
98101
await github.pulls.createReview({
99102
...context.repo,
100-
pull_number: ${{steps.pull-number.outputs.result}},
103+
pull_number: context.payload.number,
101104
body: reviewMessage,
102105
event: 'REQUEST_CHANGES'
103106
})
104107
# When the most recent review was CHANGES_REQUESTED and the existing
105108
# PR no longer contains unallowed changes, dismiss the previous review
106109
- name: Dismiss pull request review
107-
if: ${{ steps.filter.outputs.notAllowed == 'false' && fromJson(steps.requested-change.outputs.result).state == 'CHANGES_REQUESTED' }}
110+
# Check that unallowed files aren't modified and that a
111+
# CHANGES_REQUESTED review already exists
112+
if: ${{ steps.filter.outputs.notAllowed == 'false' && steps.requested-change.outputs.result && fromJson(steps.requested-change.outputs.result).state == 'CHANGES_REQUESTED' }}
108113
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
109114
with:
110115
github-token: ${{secrets.GITHUB_TOKEN}}
111116
script: |
112117
await github.pulls.dismissReview({
113118
...context.repo,
114-
pull_number: ${{steps.pull-number.outputs.result}},
119+
pull_number: context.payload.number,
115120
review_id: ${{fromJson(steps.requested-change.outputs.result).id}},
116121
message: `✨Looks like you reverted all files we don't accept contributions for. 🙌 A member of the docs team will review your PR soon. 🚂`
117122
})

.github/workflows/update-graphql-files.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ env:
99
FREEZE: ${{ secrets.FREEZE }}
1010

1111
on:
12+
workflow_dispatch:
1213
schedule:
1314
- cron: '20 16 * * *' # run every day at 16:20 UTC / 8:20 PST
1415

@@ -36,15 +37,15 @@ jobs:
3637
- name: Run updater scripts
3738
env:
3839
# need to use a token from a user with access to github/github for this step
39-
GITHUB_TOKEN: ${{ secrets.ZEKE_PAT_WITH_REPO_AND_WORKFLOW_SCOPE_FOR_REPO_SYNC }}
40+
GITHUB_TOKEN: ${{ secrets.RACHMARI_REPO_WORKFLOW }}
4041
run: |
4142
script/graphql/update-files.js
4243
- name: Create pull request
4344
id: create-pull-request
44-
uses: peter-evans/create-pull-request@938e6aea6f8dbdaced2064e948cb806c77fe87b8
45+
uses: peter-evans/create-pull-request@8c603dbb04b917a9fc2dd991dc54fef54b640b43
4546
with:
4647
# need to use a token with repo and workflow scopes for this step
47-
token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
48+
token: ${{ secrets.GITHUB_TOKEN }}
4849
commit-message: 'Action ran graphql script"update-files"'
4950
title: GraphQL schema update
5051
body:

Gemfile.lock

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ GEM
1010

1111
PLATFORMS
1212
ruby
13+
x86_64-linux
1314

1415
DEPENDENCIES
1516
graphql (= 1.10.6)
1617
graphql-schema_comparator (~> 1.0.0)
1718

1819
BUNDLED WITH
19-
2.1.4
20+
2.2.1

app.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
"name": "docs.github.com",
33
"env": {
44
"NODE_ENV": "production",
5-
"NPM_CONFIG_PRODUCTION": "true"
5+
"NPM_CONFIG_PRODUCTION": "true",
6+
"ENABLED_LANGUAGES": "en, de"
67
},
78
"buildpacks": [
9+
{ "url": "https://github.com/DataDog/heroku-buildpack-datadog.git#1.21" },
810
{ "url": "heroku/nodejs" }
911
],
1012
"formation": {
89.2 KB
Loading
52.5 KB
Loading
147 KB
Loading

0 commit comments

Comments
 (0)