Skip to content

Commit 5df8a06

Browse files
author
Martin Lopes
authored
Merge branch 'main' into al-cheb/windows-default-shell
2 parents d64a937 + 25284f5 commit 5df8a06

2,839 files changed

Lines changed: 48990 additions & 9906 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/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,8 +9,9 @@ env:
99
FREEZE: ${{ secrets.FREEZE }}
1010

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

1516
jobs:
1617
update_graphql_files:
@@ -36,7 +37,7 @@ 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.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
4041
run: |
4142
script/graphql/update-files.js
4243
- name: Create pull request

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
65.5 KB
Loading
22.8 KB
Loading
24.6 KB
Loading
13.8 KB
Loading

0 commit comments

Comments
 (0)