Skip to content

Commit e0588ef

Browse files
authored
Merge branch 'main' into patch-2
2 parents 2506b67 + 2cf85ab commit e0588ef

File tree

2,821 files changed

+48801
-9776
lines changed

Some content is hidden

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

2,821 files changed

+48801
-9776
lines changed

.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
})

app.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"NPM_CONFIG_PRODUCTION": "true"
66
},
77
"buildpacks": [
8+
{ "url": "https://github.com/DataDog/heroku-buildpack-datadog.git#1.21" },
89
{ "url": "heroku/nodejs" }
910
],
1011
"formation": {
89.2 KB
Loading
52.5 KB
Loading
147 KB
Loading
Loading
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)