Skip to content

Commit be7f16a

Browse files
authoredMay 3, 2023
feat: add probot settings template (#310)
1 parent 25ee5b6 commit be7f16a

File tree

6 files changed

+186
-0
lines changed

6 files changed

+186
-0
lines changed
 

‎.github/settings.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# This file is automatically added by @npmcli/template-oss. Do not edit.
2+
3+
repository:
4+
allow_merge_commit: false
5+
allow_rebase_merge: true
6+
allow_squash_merge: true
7+
squash_merge_commit_title: PR_TITLE
8+
squash_merge_commit_message: PR_BODY
9+
delete_branch_on_merge: true
10+
enable_automated_security_fixes: true
11+
enable_vulnerability_alerts: true
12+
13+
branches:
14+
- name: main
15+
protection:
16+
required_pull_request_reviews:
17+
required_pull_request_review_count: 1
18+
dismiss_stale_reviews: true
19+
require_code_owner_reviews: true
20+
restrictions:
21+
teams:
22+
- "npm/cli-team"
23+
enforce_admins: true
24+
required_status_checks: null
25+
- name: latest
26+
protection:
27+
required_pull_request_reviews:
28+
required_pull_request_review_count: 1
29+
dismiss_stale_reviews: true
30+
require_code_owner_reviews: true
31+
restrictions:
32+
teams:
33+
- "npm/cli-team"
34+
enforce_admins: true
35+
required_status_checks: null

‎lib/content/index.js

+3
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ const sharedRootAdd = (name) => ({
4949
'.github/workflows/post-dependabot.yml': {
5050
file: 'post-dependabot.yml',
5151
},
52+
'.github/settings.yml': {
53+
file: 'settings.yml',
54+
},
5255
})
5356

5457
const sharedRootRm = () => ({

‎lib/content/settings.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
repository:
2+
allow_merge_commit: false
3+
allow_rebase_merge: true
4+
allow_squash_merge: true
5+
squash_merge_commit_title: PR_TITLE
6+
squash_merge_commit_message: PR_BODY
7+
delete_branch_on_merge: true
8+
enable_automated_security_fixes: true
9+
enable_vulnerability_alerts: true
10+
11+
branches:
12+
{{#each branches}}
13+
- name: {{ . }}
14+
protection:
15+
required_pull_request_reviews:
16+
required_pull_request_review_count: 1
17+
dismiss_stale_reviews: true
18+
require_code_owner_reviews: true
19+
restrictions:
20+
teams:
21+
- "npm/cli-team"
22+
enforce_admins: true
23+
required_status_checks: null
24+
{{/each}}

‎tap-snapshots/test/apply/files-snapshots.js.test.cjs

+6
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ exports[`test/apply/files-snapshots.js TAP private workspace > expect resolving
1313
.github/ISSUE_TEMPLATE/bug.yml
1414
.github/ISSUE_TEMPLATE/config.yml
1515
.github/matchers/tap.json
16+
.github/settings.yml
1617
.github/workflows/audit.yml
1718
.github/workflows/ci-a.yml
1819
.github/workflows/ci-b.yml
@@ -44,6 +45,7 @@ exports[`test/apply/files-snapshots.js TAP turn off add/rm types > expect resolv
4445
.github/ISSUE_TEMPLATE/bug.yml
4546
.github/ISSUE_TEMPLATE/config.yml
4647
.github/matchers/tap.json
48+
.github/settings.yml
4749
.github/workflows/audit.yml
4850
.github/workflows/ci-release.yml
4951
.github/workflows/ci.yml
@@ -63,6 +65,7 @@ exports[`test/apply/files-snapshots.js TAP turn off module > expect resolving Pr
6365
.github/ISSUE_TEMPLATE/bug.yml
6466
.github/ISSUE_TEMPLATE/config.yml
6567
.github/matchers/tap.json
68+
.github/settings.yml
6669
.github/workflows/audit.yml
6770
.github/workflows/ci-release.yml
6871
.github/workflows/ci.yml
@@ -95,6 +98,7 @@ exports[`test/apply/files-snapshots.js TAP turn off specific files > expect reso
9598
.github/ISSUE_TEMPLATE/bug.yml
9699
.github/ISSUE_TEMPLATE/config.yml
97100
.github/matchers/tap.json
101+
.github/settings.yml
98102
.github/workflows/audit.yml
99103
.github/workflows/ci-release.yml
100104
.github/workflows/ci.yml
@@ -115,6 +119,7 @@ SECURITY.md
115119
exports[`test/apply/files-snapshots.js TAP workspaces > expect resolving Promise 1`] = `
116120
.github/dependabot.yml
117121
.github/matchers/tap.json
122+
.github/settings.yml
118123
.github/workflows/ci-d.yml
119124
.github/workflows/ci-release.yml
120125
.github/workflows/post-dependabot.yml
@@ -138,6 +143,7 @@ workspaces/d/package.json
138143
exports[`test/apply/files-snapshots.js TAP workspaces only (like npm/cli) > expect resolving Promise 1`] = `
139144
.github/dependabot.yml
140145
.github/matchers/tap.json
146+
.github/settings.yml
141147
.github/workflows/ci-a.yml
142148
.github/workflows/ci-b.yml
143149
.github/workflows/ci-release.yml

‎tap-snapshots/test/apply/source-snapshots.js.test.cjs

+114
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,44 @@ blank_issues_enabled: true
163163
]
164164
}
165165
166+
.github/settings.yml
167+
========================================
168+
# This file is automatically added by @npmcli/template-oss. Do not edit.
169+
170+
repository:
171+
allow_merge_commit: false
172+
allow_rebase_merge: true
173+
allow_squash_merge: true
174+
squash_merge_commit_title: PR_TITLE
175+
squash_merge_commit_message: PR_BODY
176+
delete_branch_on_merge: true
177+
enable_automated_security_fixes: true
178+
enable_vulnerability_alerts: true
179+
180+
branches:
181+
- name: main
182+
protection:
183+
required_pull_request_reviews:
184+
required_pull_request_review_count: 1
185+
dismiss_stale_reviews: true
186+
require_code_owner_reviews: true
187+
restrictions:
188+
teams:
189+
- "npm/cli-team"
190+
enforce_admins: true
191+
required_status_checks: null
192+
- name: latest
193+
protection:
194+
required_pull_request_reviews:
195+
required_pull_request_review_count: 1
196+
dismiss_stale_reviews: true
197+
require_code_owner_reviews: true
198+
restrictions:
199+
teams:
200+
- "npm/cli-team"
201+
enforce_admins: true
202+
required_status_checks: null
203+
166204
.github/workflows/audit.yml
167205
========================================
168206
# This file is automatically added by @npmcli/template-oss. Do not edit.
@@ -1516,6 +1554,44 @@ blank_issues_enabled: true
15161554
]
15171555
}
15181556
1557+
.github/settings.yml
1558+
========================================
1559+
# This file is automatically added by @npmcli/template-oss. Do not edit.
1560+
1561+
repository:
1562+
allow_merge_commit: false
1563+
allow_rebase_merge: true
1564+
allow_squash_merge: true
1565+
squash_merge_commit_title: PR_TITLE
1566+
squash_merge_commit_message: PR_BODY
1567+
delete_branch_on_merge: true
1568+
enable_automated_security_fixes: true
1569+
enable_vulnerability_alerts: true
1570+
1571+
branches:
1572+
- name: main
1573+
protection:
1574+
required_pull_request_reviews:
1575+
required_pull_request_review_count: 1
1576+
dismiss_stale_reviews: true
1577+
require_code_owner_reviews: true
1578+
restrictions:
1579+
teams:
1580+
- "npm/cli-team"
1581+
enforce_admins: true
1582+
required_status_checks: null
1583+
- name: latest
1584+
protection:
1585+
required_pull_request_reviews:
1586+
required_pull_request_review_count: 1
1587+
dismiss_stale_reviews: true
1588+
require_code_owner_reviews: true
1589+
restrictions:
1590+
teams:
1591+
- "npm/cli-team"
1592+
enforce_admins: true
1593+
required_status_checks: null
1594+
15191595
.github/workflows/audit.yml
15201596
========================================
15211597
# This file is automatically added by @npmcli/template-oss. Do not edit.
@@ -3145,6 +3221,44 @@ updates:
31453221
]
31463222
}
31473223
3224+
.github/settings.yml
3225+
========================================
3226+
# This file is automatically added by @npmcli/template-oss. Do not edit.
3227+
3228+
repository:
3229+
allow_merge_commit: false
3230+
allow_rebase_merge: true
3231+
allow_squash_merge: true
3232+
squash_merge_commit_title: PR_TITLE
3233+
squash_merge_commit_message: PR_BODY
3234+
delete_branch_on_merge: true
3235+
enable_automated_security_fixes: true
3236+
enable_vulnerability_alerts: true
3237+
3238+
branches:
3239+
- name: main
3240+
protection:
3241+
required_pull_request_reviews:
3242+
required_pull_request_review_count: 1
3243+
dismiss_stale_reviews: true
3244+
require_code_owner_reviews: true
3245+
restrictions:
3246+
teams:
3247+
- "npm/cli-team"
3248+
enforce_admins: true
3249+
required_status_checks: null
3250+
- name: latest
3251+
protection:
3252+
required_pull_request_reviews:
3253+
required_pull_request_review_count: 1
3254+
dismiss_stale_reviews: true
3255+
require_code_owner_reviews: true
3256+
restrictions:
3257+
teams:
3258+
- "npm/cli-team"
3259+
enforce_admins: true
3260+
required_status_checks: null
3261+
31483262
.github/workflows/ci-a.yml
31493263
========================================
31503264
# This file is automatically added by @npmcli/template-oss. Do not edit.

‎tap-snapshots/test/check/snapshots.js.test.cjs

+4
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ The following repo files need to be added:
3535
.github/ISSUE_TEMPLATE/bug.yml
3636
.github/ISSUE_TEMPLATE/config.yml
3737
.github/matchers/tap.json
38+
.github/settings.yml
3839
.github/workflows/audit.yml
3940
.github/workflows/ci-release.yml
4041
.github/workflows/ci.yml
@@ -282,6 +283,7 @@ The following repo files need to be added:
282283
.github/ISSUE_TEMPLATE/bug.yml
283284
.github/ISSUE_TEMPLATE/config.yml
284285
.github/matchers/tap.json
286+
.github/settings.yml
285287
.github/workflows/audit.yml
286288
.github/workflows/ci-release.yml
287289
.github/workflows/ci.yml
@@ -365,6 +367,7 @@ The following repo files need to be added:
365367
366368
.github/dependabot.yml
367369
.github/matchers/tap.json
370+
.github/settings.yml
368371
.github/workflows/ci-name-aaaa.yml
369372
.github/workflows/ci-release.yml
370373
.github/workflows/post-dependabot.yml
@@ -436,6 +439,7 @@ The following repo files need to be added:
436439
437440
.github/dependabot.yml
438441
.github/matchers/tap.json
442+
.github/settings.yml
439443
.github/workflows/ci-bbb.yml
440444
.github/workflows/ci-release.yml
441445
.github/workflows/post-dependabot.yml

0 commit comments

Comments
 (0)
Please sign in to comment.