Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add probot settings template #310

Merged
merged 1 commit into from
May 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This file is automatically added by @npmcli/template-oss. Do not edit.

repository:
allow_merge_commit: false
allow_rebase_merge: true
allow_squash_merge: true
squash_merge_commit_title: PR_TITLE
squash_merge_commit_message: PR_BODY
delete_branch_on_merge: true
enable_automated_security_fixes: true
enable_vulnerability_alerts: true

branches:
- name: main
protection:
required_pull_request_reviews:
required_pull_request_review_count: 1
dismiss_stale_reviews: true
require_code_owner_reviews: true
restrictions:
teams:
- "npm/cli-team"
enforce_admins: true
required_status_checks: null
- name: latest
protection:
required_pull_request_reviews:
required_pull_request_review_count: 1
dismiss_stale_reviews: true
require_code_owner_reviews: true
restrictions:
teams:
- "npm/cli-team"
enforce_admins: true
required_status_checks: null
3 changes: 3 additions & 0 deletions lib/content/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ const sharedRootAdd = (name) => ({
'.github/workflows/post-dependabot.yml': {
file: 'post-dependabot.yml',
},
'.github/settings.yml': {
file: 'settings.yml',
},
})

const sharedRootRm = () => ({
Expand Down
24 changes: 24 additions & 0 deletions lib/content/settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
repository:
allow_merge_commit: false
allow_rebase_merge: true
allow_squash_merge: true
squash_merge_commit_title: PR_TITLE
squash_merge_commit_message: PR_BODY
delete_branch_on_merge: true
enable_automated_security_fixes: true
enable_vulnerability_alerts: true

branches:
{{#each branches}}
- name: {{ . }}
protection:
required_pull_request_reviews:
required_pull_request_review_count: 1
dismiss_stale_reviews: true
require_code_owner_reviews: true
restrictions:
teams:
- "npm/cli-team"
enforce_admins: true
required_status_checks: null
{{/each}}
6 changes: 6 additions & 0 deletions tap-snapshots/test/apply/files-snapshots.js.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ exports[`test/apply/files-snapshots.js TAP private workspace > expect resolving
.github/ISSUE_TEMPLATE/bug.yml
.github/ISSUE_TEMPLATE/config.yml
.github/matchers/tap.json
.github/settings.yml
.github/workflows/audit.yml
.github/workflows/ci-a.yml
.github/workflows/ci-b.yml
Expand Down Expand Up @@ -44,6 +45,7 @@ exports[`test/apply/files-snapshots.js TAP turn off add/rm types > expect resolv
.github/ISSUE_TEMPLATE/bug.yml
.github/ISSUE_TEMPLATE/config.yml
.github/matchers/tap.json
.github/settings.yml
.github/workflows/audit.yml
.github/workflows/ci-release.yml
.github/workflows/ci.yml
Expand All @@ -63,6 +65,7 @@ exports[`test/apply/files-snapshots.js TAP turn off module > expect resolving Pr
.github/ISSUE_TEMPLATE/bug.yml
.github/ISSUE_TEMPLATE/config.yml
.github/matchers/tap.json
.github/settings.yml
.github/workflows/audit.yml
.github/workflows/ci-release.yml
.github/workflows/ci.yml
Expand Down Expand Up @@ -95,6 +98,7 @@ exports[`test/apply/files-snapshots.js TAP turn off specific files > expect reso
.github/ISSUE_TEMPLATE/bug.yml
.github/ISSUE_TEMPLATE/config.yml
.github/matchers/tap.json
.github/settings.yml
.github/workflows/audit.yml
.github/workflows/ci-release.yml
.github/workflows/ci.yml
Expand All @@ -115,6 +119,7 @@ SECURITY.md
exports[`test/apply/files-snapshots.js TAP workspaces > expect resolving Promise 1`] = `
.github/dependabot.yml
.github/matchers/tap.json
.github/settings.yml
.github/workflows/ci-d.yml
.github/workflows/ci-release.yml
.github/workflows/post-dependabot.yml
Expand All @@ -138,6 +143,7 @@ workspaces/d/package.json
exports[`test/apply/files-snapshots.js TAP workspaces only (like npm/cli) > expect resolving Promise 1`] = `
.github/dependabot.yml
.github/matchers/tap.json
.github/settings.yml
.github/workflows/ci-a.yml
.github/workflows/ci-b.yml
.github/workflows/ci-release.yml
Expand Down
114 changes: 114 additions & 0 deletions tap-snapshots/test/apply/source-snapshots.js.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,44 @@ blank_issues_enabled: true
]
}

.github/settings.yml
========================================
# This file is automatically added by @npmcli/template-oss. Do not edit.

repository:
allow_merge_commit: false
allow_rebase_merge: true
allow_squash_merge: true
squash_merge_commit_title: PR_TITLE
squash_merge_commit_message: PR_BODY
delete_branch_on_merge: true
enable_automated_security_fixes: true
enable_vulnerability_alerts: true

branches:
- name: main
protection:
required_pull_request_reviews:
required_pull_request_review_count: 1
dismiss_stale_reviews: true
require_code_owner_reviews: true
restrictions:
teams:
- "npm/cli-team"
enforce_admins: true
required_status_checks: null
- name: latest
protection:
required_pull_request_reviews:
required_pull_request_review_count: 1
dismiss_stale_reviews: true
require_code_owner_reviews: true
restrictions:
teams:
- "npm/cli-team"
enforce_admins: true
required_status_checks: null

.github/workflows/audit.yml
========================================
# This file is automatically added by @npmcli/template-oss. Do not edit.
Expand Down Expand Up @@ -1516,6 +1554,44 @@ blank_issues_enabled: true
]
}

.github/settings.yml
========================================
# This file is automatically added by @npmcli/template-oss. Do not edit.

repository:
allow_merge_commit: false
allow_rebase_merge: true
allow_squash_merge: true
squash_merge_commit_title: PR_TITLE
squash_merge_commit_message: PR_BODY
delete_branch_on_merge: true
enable_automated_security_fixes: true
enable_vulnerability_alerts: true

branches:
- name: main
protection:
required_pull_request_reviews:
required_pull_request_review_count: 1
dismiss_stale_reviews: true
require_code_owner_reviews: true
restrictions:
teams:
- "npm/cli-team"
enforce_admins: true
required_status_checks: null
- name: latest
protection:
required_pull_request_reviews:
required_pull_request_review_count: 1
dismiss_stale_reviews: true
require_code_owner_reviews: true
restrictions:
teams:
- "npm/cli-team"
enforce_admins: true
required_status_checks: null

.github/workflows/audit.yml
========================================
# This file is automatically added by @npmcli/template-oss. Do not edit.
Expand Down Expand Up @@ -3145,6 +3221,44 @@ updates:
]
}

.github/settings.yml
========================================
# This file is automatically added by @npmcli/template-oss. Do not edit.

repository:
allow_merge_commit: false
allow_rebase_merge: true
allow_squash_merge: true
squash_merge_commit_title: PR_TITLE
squash_merge_commit_message: PR_BODY
delete_branch_on_merge: true
enable_automated_security_fixes: true
enable_vulnerability_alerts: true

branches:
- name: main
protection:
required_pull_request_reviews:
required_pull_request_review_count: 1
dismiss_stale_reviews: true
require_code_owner_reviews: true
restrictions:
teams:
- "npm/cli-team"
enforce_admins: true
required_status_checks: null
- name: latest
protection:
required_pull_request_reviews:
required_pull_request_review_count: 1
dismiss_stale_reviews: true
require_code_owner_reviews: true
restrictions:
teams:
- "npm/cli-team"
enforce_admins: true
required_status_checks: null

.github/workflows/ci-a.yml
========================================
# This file is automatically added by @npmcli/template-oss. Do not edit.
Expand Down
4 changes: 4 additions & 0 deletions tap-snapshots/test/check/snapshots.js.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ The following repo files need to be added:
.github/ISSUE_TEMPLATE/bug.yml
.github/ISSUE_TEMPLATE/config.yml
.github/matchers/tap.json
.github/settings.yml
.github/workflows/audit.yml
.github/workflows/ci-release.yml
.github/workflows/ci.yml
Expand Down Expand Up @@ -282,6 +283,7 @@ The following repo files need to be added:
.github/ISSUE_TEMPLATE/bug.yml
.github/ISSUE_TEMPLATE/config.yml
.github/matchers/tap.json
.github/settings.yml
.github/workflows/audit.yml
.github/workflows/ci-release.yml
.github/workflows/ci.yml
Expand Down Expand Up @@ -365,6 +367,7 @@ The following repo files need to be added:

.github/dependabot.yml
.github/matchers/tap.json
.github/settings.yml
.github/workflows/ci-name-aaaa.yml
.github/workflows/ci-release.yml
.github/workflows/post-dependabot.yml
Expand Down Expand Up @@ -436,6 +439,7 @@ The following repo files need to be added:

.github/dependabot.yml
.github/matchers/tap.json
.github/settings.yml
.github/workflows/ci-bbb.yml
.github/workflows/ci-release.yml
.github/workflows/post-dependabot.yml
Expand Down