From 7a2481c7312a539bfdba6881ac8fbadae41c64b9 Mon Sep 17 00:00:00 2001 From: nlf Date: Wed, 26 Apr 2023 12:01:40 -0700 Subject: [PATCH 01/11] fix: update the LouisBrunner/checks-action to latest (#305) --- .github/workflows/ci-release.yml | 8 ++-- .github/workflows/release.yml | 8 ++-- lib/content/_step-checks.yml | 2 +- .../test/apply/source-snapshots.js.test.cjs | 48 +++++++++---------- 4 files changed, 33 insertions(+), 33 deletions(-) diff --git a/.github/workflows/ci-release.yml b/.github/workflows/ci-release.yml index 73209f32..8e97dfcc 100644 --- a/.github/workflows/ci-release.yml +++ b/.github/workflows/ci-release.yml @@ -61,7 +61,7 @@ jobs: return { summary } - name: Create Check - uses: LouisBrunner/checks-action@v1.3.1 + uses: LouisBrunner/checks-action@v1.6.0 id: check if: inputs.check-sha with: @@ -93,7 +93,7 @@ jobs: - name: Post Lint run: npm run postlint --ignore-scripts -ws -iwr --if-present - name: Conclude Check - uses: LouisBrunner/checks-action@v1.3.1 + uses: LouisBrunner/checks-action@v1.6.0 if: steps.check.outputs.check_id && always() with: token: ${{ secrets.GITHUB_TOKEN }} @@ -162,7 +162,7 @@ jobs: return { summary } - name: Create Check - uses: LouisBrunner/checks-action@v1.3.1 + uses: LouisBrunner/checks-action@v1.6.0 id: check if: inputs.check-sha with: @@ -208,7 +208,7 @@ jobs: - name: Test run: npm test --ignore-scripts -ws -iwr --if-present - name: Conclude Check - uses: LouisBrunner/checks-action@v1.3.1 + uses: LouisBrunner/checks-action@v1.6.0 if: steps.check.outputs.check_id && always() with: token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 396a6090..810e7f3e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -124,7 +124,7 @@ jobs: return { summary } - name: Create Check - uses: LouisBrunner/checks-action@v1.3.1 + uses: LouisBrunner/checks-action@v1.6.0 id: check if: steps.release.outputs.pr-sha with: @@ -215,7 +215,7 @@ jobs: return { summary } - name: Create Check - uses: LouisBrunner/checks-action@v1.3.1 + uses: LouisBrunner/checks-action@v1.6.0 id: check if: steps.commit.outputs.sha with: @@ -225,7 +225,7 @@ jobs: sha: ${{ steps.commit.outputs.sha }} output: ${{ steps.check-output.outputs.result }} - name: Conclude Check - uses: LouisBrunner/checks-action@v1.3.1 + uses: LouisBrunner/checks-action@v1.6.0 if: needs.release.outputs.check-id && always() with: token: ${{ secrets.GITHUB_TOKEN }} @@ -263,7 +263,7 @@ jobs: fi echo "result=$result" >> $GITHUB_OUTPUT - name: Conclude Check - uses: LouisBrunner/checks-action@v1.3.1 + uses: LouisBrunner/checks-action@v1.6.0 if: needs.update.outputs.check-id && always() with: token: ${{ secrets.GITHUB_TOKEN }} diff --git a/lib/content/_step-checks.yml b/lib/content/_step-checks.yml index 3eb8cc56..469456bf 100644 --- a/lib/content/_step-checks.yml +++ b/lib/content/_step-checks.yml @@ -34,7 +34,7 @@ return { summary } {{/if}} - name: {{#if jobCheck.sha}}Create{{else}}Conclude{{/if}} Check - uses: LouisBrunner/checks-action@v1.3.1 + uses: LouisBrunner/checks-action@v1.6.0 {{#if jobCheck.sha}} id: check if: {{ jobCheck.sha }} diff --git a/tap-snapshots/test/apply/source-snapshots.js.test.cjs b/tap-snapshots/test/apply/source-snapshots.js.test.cjs index b494d999..d5ec8823 100644 --- a/tap-snapshots/test/apply/source-snapshots.js.test.cjs +++ b/tap-snapshots/test/apply/source-snapshots.js.test.cjs @@ -270,7 +270,7 @@ jobs: return { summary } - name: Create Check - uses: LouisBrunner/checks-action@v1.3.1 + uses: LouisBrunner/checks-action@v1.6.0 id: check if: inputs.check-sha with: @@ -302,7 +302,7 @@ jobs: - name: Post Lint run: npm run postlint --ignore-scripts - name: Conclude Check - uses: LouisBrunner/checks-action@v1.3.1 + uses: LouisBrunner/checks-action@v1.6.0 if: steps.check.outputs.check_id && always() with: token: \${{ secrets.GITHUB_TOKEN }} @@ -371,7 +371,7 @@ jobs: return { summary } - name: Create Check - uses: LouisBrunner/checks-action@v1.3.1 + uses: LouisBrunner/checks-action@v1.6.0 id: check if: inputs.check-sha with: @@ -417,7 +417,7 @@ jobs: - name: Test run: npm test --ignore-scripts - name: Conclude Check - uses: LouisBrunner/checks-action@v1.3.1 + uses: LouisBrunner/checks-action@v1.6.0 if: steps.check.outputs.check_id && always() with: token: \${{ secrets.GITHUB_TOKEN }} @@ -878,7 +878,7 @@ jobs: return { summary } - name: Create Check - uses: LouisBrunner/checks-action@v1.3.1 + uses: LouisBrunner/checks-action@v1.6.0 id: check if: steps.release.outputs.pr-sha with: @@ -969,7 +969,7 @@ jobs: return { summary } - name: Create Check - uses: LouisBrunner/checks-action@v1.3.1 + uses: LouisBrunner/checks-action@v1.6.0 id: check if: steps.commit.outputs.sha with: @@ -979,7 +979,7 @@ jobs: sha: \${{ steps.commit.outputs.sha }} output: \${{ steps.check-output.outputs.result }} - name: Conclude Check - uses: LouisBrunner/checks-action@v1.3.1 + uses: LouisBrunner/checks-action@v1.6.0 if: needs.release.outputs.check-id && always() with: token: \${{ secrets.GITHUB_TOKEN }} @@ -1017,7 +1017,7 @@ jobs: fi echo "result=$result" >> $GITHUB_OUTPUT - name: Conclude Check - uses: LouisBrunner/checks-action@v1.3.1 + uses: LouisBrunner/checks-action@v1.6.0 if: needs.update.outputs.check-id && always() with: token: \${{ secrets.GITHUB_TOKEN }} @@ -1849,7 +1849,7 @@ jobs: return { summary } - name: Create Check - uses: LouisBrunner/checks-action@v1.3.1 + uses: LouisBrunner/checks-action@v1.6.0 id: check if: inputs.check-sha with: @@ -1881,7 +1881,7 @@ jobs: - name: Post Lint run: npm run postlint --ignore-scripts -ws -iwr --if-present - name: Conclude Check - uses: LouisBrunner/checks-action@v1.3.1 + uses: LouisBrunner/checks-action@v1.6.0 if: steps.check.outputs.check_id && always() with: token: \${{ secrets.GITHUB_TOKEN }} @@ -1950,7 +1950,7 @@ jobs: return { summary } - name: Create Check - uses: LouisBrunner/checks-action@v1.3.1 + uses: LouisBrunner/checks-action@v1.6.0 id: check if: inputs.check-sha with: @@ -1996,7 +1996,7 @@ jobs: - name: Test run: npm test --ignore-scripts -ws -iwr --if-present - name: Conclude Check - uses: LouisBrunner/checks-action@v1.3.1 + uses: LouisBrunner/checks-action@v1.6.0 if: steps.check.outputs.check_id && always() with: token: \${{ secrets.GITHUB_TOKEN }} @@ -2463,7 +2463,7 @@ jobs: return { summary } - name: Create Check - uses: LouisBrunner/checks-action@v1.3.1 + uses: LouisBrunner/checks-action@v1.6.0 id: check if: steps.release.outputs.pr-sha with: @@ -2554,7 +2554,7 @@ jobs: return { summary } - name: Create Check - uses: LouisBrunner/checks-action@v1.3.1 + uses: LouisBrunner/checks-action@v1.6.0 id: check if: steps.commit.outputs.sha with: @@ -2564,7 +2564,7 @@ jobs: sha: \${{ steps.commit.outputs.sha }} output: \${{ steps.check-output.outputs.result }} - name: Conclude Check - uses: LouisBrunner/checks-action@v1.3.1 + uses: LouisBrunner/checks-action@v1.6.0 if: needs.release.outputs.check-id && always() with: token: \${{ secrets.GITHUB_TOKEN }} @@ -2602,7 +2602,7 @@ jobs: fi echo "result=$result" >> $GITHUB_OUTPUT - name: Conclude Check - uses: LouisBrunner/checks-action@v1.3.1 + uses: LouisBrunner/checks-action@v1.6.0 if: needs.update.outputs.check-id && always() with: token: \${{ secrets.GITHUB_TOKEN }} @@ -3434,7 +3434,7 @@ jobs: return { summary } - name: Create Check - uses: LouisBrunner/checks-action@v1.3.1 + uses: LouisBrunner/checks-action@v1.6.0 id: check if: inputs.check-sha with: @@ -3466,7 +3466,7 @@ jobs: - name: Post Lint run: npm run postlint --ignore-scripts -ws -iwr --if-present - name: Conclude Check - uses: LouisBrunner/checks-action@v1.3.1 + uses: LouisBrunner/checks-action@v1.6.0 if: steps.check.outputs.check_id && always() with: token: \${{ secrets.GITHUB_TOKEN }} @@ -3535,7 +3535,7 @@ jobs: return { summary } - name: Create Check - uses: LouisBrunner/checks-action@v1.3.1 + uses: LouisBrunner/checks-action@v1.6.0 id: check if: inputs.check-sha with: @@ -3581,7 +3581,7 @@ jobs: - name: Test run: npm test --ignore-scripts -ws -iwr --if-present - name: Conclude Check - uses: LouisBrunner/checks-action@v1.3.1 + uses: LouisBrunner/checks-action@v1.6.0 if: steps.check.outputs.check_id && always() with: token: \${{ secrets.GITHUB_TOKEN }} @@ -3891,7 +3891,7 @@ jobs: return { summary } - name: Create Check - uses: LouisBrunner/checks-action@v1.3.1 + uses: LouisBrunner/checks-action@v1.6.0 id: check if: steps.release.outputs.pr-sha with: @@ -3982,7 +3982,7 @@ jobs: return { summary } - name: Create Check - uses: LouisBrunner/checks-action@v1.3.1 + uses: LouisBrunner/checks-action@v1.6.0 id: check if: steps.commit.outputs.sha with: @@ -3992,7 +3992,7 @@ jobs: sha: \${{ steps.commit.outputs.sha }} output: \${{ steps.check-output.outputs.result }} - name: Conclude Check - uses: LouisBrunner/checks-action@v1.3.1 + uses: LouisBrunner/checks-action@v1.6.0 if: needs.release.outputs.check-id && always() with: token: \${{ secrets.GITHUB_TOKEN }} @@ -4030,7 +4030,7 @@ jobs: fi echo "result=$result" >> $GITHUB_OUTPUT - name: Conclude Check - uses: LouisBrunner/checks-action@v1.3.1 + uses: LouisBrunner/checks-action@v1.6.0 if: needs.update.outputs.check-id && always() with: token: \${{ secrets.GITHUB_TOKEN }} From 1babe54a8db71b40cf0eaabf3ee056796ba333ae Mon Sep 17 00:00:00 2001 From: nlf Date: Wed, 26 Apr 2023 12:03:40 -0700 Subject: [PATCH 02/11] fix: use a more portable means of spawning subshells (#306) --- bin/release-manager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/release-manager.js b/bin/release-manager.js index 5e29084c..cd0bedc7 100755 --- a/bin/release-manager.js +++ b/bin/release-manager.js @@ -63,7 +63,7 @@ const DEFAULT_RELEASE_PROCESS = (args.publish ? AUTO_PUBLISH_STEPS : MANUAL_PUBL Release Please will run on the just pushed release commit and create GitHub releases and tags for each package. \`\`\` - gh run watch \`gh run list -R {NWO} -w release -b -L 1 --json databaseId -q ".[0].databaseId"\` + gh run watch $(gh run list -R {NWO} -w release -b -L 1 --json databaseId -q ".[0].databaseId") \`\`\` ` /* eslint-enable max-len */ From 1edde270606255276dc30ef1526970cac1b30644 Mon Sep 17 00:00:00 2001 From: nlf Date: Thu, 27 Apr 2023 12:14:06 -0700 Subject: [PATCH 03/11] fix: add the -R flag to the post-publish action for easier copy/paste (#308) --- bin/release-manager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/release-manager.js b/bin/release-manager.js index cd0bedc7..b56695af 100755 --- a/bin/release-manager.js +++ b/bin/release-manager.js @@ -63,7 +63,7 @@ const DEFAULT_RELEASE_PROCESS = (args.publish ? AUTO_PUBLISH_STEPS : MANUAL_PUBL Release Please will run on the just pushed release commit and create GitHub releases and tags for each package. \`\`\` - gh run watch $(gh run list -R {NWO} -w release -b -L 1 --json databaseId -q ".[0].databaseId") + gh run watch -R {NWO} $(gh run list -R {NWO} -w release -b -L 1 --json databaseId -q ".[0].databaseId") \`\`\` ` /* eslint-enable max-len */ From 238fc4ae07fc9d05454c7f478dfe980b393c10f5 Mon Sep 17 00:00:00 2001 From: Gar Date: Mon, 1 May 2023 07:12:32 -0700 Subject: [PATCH 04/11] fix: pull PR_TITLE into env --- .github/workflows/pull-request.yml | 4 +++- lib/content/pull-request.yml | 4 +++- .../test/apply/source-snapshots.js.test.cjs | 12 +++++++++--- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 99877daa..721ea3c0 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -44,5 +44,7 @@ jobs: npx --offline commitlint -V --from 'origin/${{ github.base_ref }}' --to ${{ github.event.pull_request.head.sha }} - name: Run Commitlint on PR Title if: steps.commit.outcome == 'failure' + env: + PR_TITLE: ${{ github.event.pull_request.title }} run: | - echo '${{ github.event.pull_request.title }}' | npx --offline commitlint -V + echo '$PR_TITLE' | npx --offline commitlint -V diff --git a/lib/content/pull-request.yml b/lib/content/pull-request.yml index a8f3b7e6..3890a3c8 100644 --- a/lib/content/pull-request.yml +++ b/lib/content/pull-request.yml @@ -18,5 +18,7 @@ jobs: {{ rootNpxPath }} --offline commitlint -V --from 'origin/$\{{ github.base_ref }}' --to $\{{ github.event.pull_request.head.sha }} - name: Run Commitlint on PR Title if: steps.commit.outcome == 'failure' + env: + PR_TITLE: $\{{ github.event.pull_request.title }} run: | - echo '$\{{ github.event.pull_request.title }}' | {{ rootNpxPath }} --offline commitlint -V + echo '$PR_TITLE' | {{ rootNpxPath }} --offline commitlint -V diff --git a/tap-snapshots/test/apply/source-snapshots.js.test.cjs b/tap-snapshots/test/apply/source-snapshots.js.test.cjs index d5ec8823..abceafce 100644 --- a/tap-snapshots/test/apply/source-snapshots.js.test.cjs +++ b/tap-snapshots/test/apply/source-snapshots.js.test.cjs @@ -747,8 +747,10 @@ jobs: npx --offline commitlint -V --from 'origin/\${{ github.base_ref }}' --to \${{ github.event.pull_request.head.sha }} - name: Run Commitlint on PR Title if: steps.commit.outcome == 'failure' + env: + PR_TITLE: \${{ github.event.pull_request.title }} run: | - echo '\${{ github.event.pull_request.title }}' | npx --offline commitlint -V + echo '$PR_TITLE' | npx --offline commitlint -V .github/workflows/release.yml ======================================== @@ -2332,8 +2334,10 @@ jobs: npx --offline commitlint -V --from 'origin/\${{ github.base_ref }}' --to \${{ github.event.pull_request.head.sha }} - name: Run Commitlint on PR Title if: steps.commit.outcome == 'failure' + env: + PR_TITLE: \${{ github.event.pull_request.title }} run: | - echo '\${{ github.event.pull_request.title }}' | npx --offline commitlint -V + echo '$PR_TITLE' | npx --offline commitlint -V .github/workflows/release.yml ======================================== @@ -3760,8 +3764,10 @@ jobs: npx --offline commitlint -V --from 'origin/\${{ github.base_ref }}' --to \${{ github.event.pull_request.head.sha }} - name: Run Commitlint on PR Title if: steps.commit.outcome == 'failure' + env: + PR_TITLE: \${{ github.event.pull_request.title }} run: | - echo '\${{ github.event.pull_request.title }}' | npx --offline commitlint -V + echo '$PR_TITLE' | npx --offline commitlint -V .github/workflows/release.yml ======================================== From dc7c5d14e759d992438459fd35ec054c9dca1bf5 Mon Sep 17 00:00:00 2001 From: Gar Date: Mon, 1 May 2023 07:21:43 -0700 Subject: [PATCH 05/11] chore: fix tests for node v20 --- test/bin/apply.js | 8 ++++---- test/bin/check.js | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/bin/apply.js b/test/bin/apply.js index 40f958fe..ab4d2981 100644 --- a/test/bin/apply.js +++ b/test/bin/apply.js @@ -27,21 +27,21 @@ t.afterEach(() => { t.test('when npm_config_local_prefix is unset, does nothing', async (t) => { await templateApply() - t.equal(process.exitCode, undefined, 'exitCode is unset') + t.notOk(process.exitCode, 'exitCode is unset') }) t.test('when npm_config_global is true, does nothing', async (t) => { process.env.npm_config_global = 'true' await templateApply() - t.equal(process.exitCode, undefined, 'exitCode is unset') + t.notOk(process.exitCode, 'exitCode is unset') }) t.test('with mocks', async (t) => { process.env.npm_config_local_prefix = 'heynow' await templateApply(() => {}) - t.equal(process.exitCode, undefined, 'exitCode is unset') + t.notOk(process.exitCode, 'exitCode is unset') }) t.test('error', async (t) => { @@ -50,5 +50,5 @@ t.test('error', async (t) => { await templateApply(() => { throw new Error('apply') }) - t.equal(process.exitCode, 1, 'exitCode is unset') + t.ok(process.exitCode, 'exitCode is unset') }) diff --git a/test/bin/check.js b/test/bin/check.js index 6841ceea..12aba611 100644 --- a/test/bin/check.js +++ b/test/bin/check.js @@ -44,7 +44,7 @@ t.test('problems', async (t) => { solution: 'solution2', }]) - t.equal(process.exitCode, 1, 'exit code') + t.ok(process.exitCode, 'exit code') t.matchSnapshot(errors.join('\n')) }) @@ -53,6 +53,6 @@ t.test('no problems', async (t) => { await templateCheck(() => []) - t.equal(process.exitCode, undefined, 'exit code') + t.notOk(process.exitCode, 'exit code') t.strictSame(errors, [], 'errors') }) From 25ee5b6091f8e396960ef9e223fcaf64a669597b Mon Sep 17 00:00:00 2001 From: nlf Date: Wed, 3 May 2023 10:15:03 -0700 Subject: [PATCH 06/11] chore: do not sign commits in tests (#311) --- test/setup.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/setup.js b/test/setup.js index 5885f28c..5593ffca 100644 --- a/test/setup.js +++ b/test/setup.js @@ -150,7 +150,7 @@ const setupGit = async (...args) => { const gca = async () => { await git('add -A .') - await git('commit -m "init"') + await git('commit --no-gpg-sign -m "init"') } await git('init') From be7f16a3662fbd2c0c5dacdf0b559f88dde81f7a Mon Sep 17 00:00:00 2001 From: nlf Date: Wed, 3 May 2023 10:19:49 -0700 Subject: [PATCH 07/11] feat: add probot settings template (#310) --- .github/settings.yml | 35 ++++++ lib/content/index.js | 3 + lib/content/settings.yml | 24 ++++ .../test/apply/files-snapshots.js.test.cjs | 6 + .../test/apply/source-snapshots.js.test.cjs | 114 ++++++++++++++++++ .../test/check/snapshots.js.test.cjs | 4 + 6 files changed, 186 insertions(+) create mode 100644 .github/settings.yml create mode 100644 lib/content/settings.yml diff --git a/.github/settings.yml b/.github/settings.yml new file mode 100644 index 00000000..50a51aff --- /dev/null +++ b/.github/settings.yml @@ -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 diff --git a/lib/content/index.js b/lib/content/index.js index 23f2c738..01b30e1a 100644 --- a/lib/content/index.js +++ b/lib/content/index.js @@ -49,6 +49,9 @@ const sharedRootAdd = (name) => ({ '.github/workflows/post-dependabot.yml': { file: 'post-dependabot.yml', }, + '.github/settings.yml': { + file: 'settings.yml', + }, }) const sharedRootRm = () => ({ diff --git a/lib/content/settings.yml b/lib/content/settings.yml new file mode 100644 index 00000000..c61f1edf --- /dev/null +++ b/lib/content/settings.yml @@ -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}} diff --git a/tap-snapshots/test/apply/files-snapshots.js.test.cjs b/tap-snapshots/test/apply/files-snapshots.js.test.cjs index 382a5258..4c79588e 100644 --- a/tap-snapshots/test/apply/files-snapshots.js.test.cjs +++ b/tap-snapshots/test/apply/files-snapshots.js.test.cjs @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/tap-snapshots/test/apply/source-snapshots.js.test.cjs b/tap-snapshots/test/apply/source-snapshots.js.test.cjs index abceafce..92e96a96 100644 --- a/tap-snapshots/test/apply/source-snapshots.js.test.cjs +++ b/tap-snapshots/test/apply/source-snapshots.js.test.cjs @@ -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. @@ -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. @@ -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. diff --git a/tap-snapshots/test/check/snapshots.js.test.cjs b/tap-snapshots/test/check/snapshots.js.test.cjs index 0e317bad..bcd9db8b 100644 --- a/tap-snapshots/test/check/snapshots.js.test.cjs +++ b/tap-snapshots/test/check/snapshots.js.test.cjs @@ -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 @@ -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 @@ -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 @@ -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 From 96776b44d73e4695d1ddad07d9104830baa61f11 Mon Sep 17 00:00:00 2001 From: Gar Date: Wed, 3 May 2023 10:29:14 -0700 Subject: [PATCH 08/11] feat: add CONTRIBUTING.md (#312) This is a pared down version of the cli CONTRIBUTING.md --- .gitignore | 1 + CONTRIBUTING.md | 50 ++++++++ lib/content/CONTRIBUTING.md | 48 ++++++++ lib/content/index.js | 1 + .../test/apply/files-snapshots.js.test.cjs | 3 + .../test/apply/source-snapshots.js.test.cjs | 108 ++++++++++++++++++ .../test/check/snapshots.js.test.cjs | 4 + 7 files changed, 215 insertions(+) create mode 100644 CONTRIBUTING.md create mode 100644 lib/content/CONTRIBUTING.md diff --git a/.gitignore b/.gitignore index 0316d2b7..135c3883 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ !/bin/ !/CHANGELOG* !/CODE_OF_CONDUCT.md +!/CONTRIBUTING.md !/docs/ !/lib/ !/LICENSE* diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..69e88788 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,50 @@ + + +# Contributing + +## Code of Conduct + +All interactions in the **npm** organization on GitHub are considered to be covered by our standard [Code of Conduct](https://docs.npmjs.com/policies/conduct). + +## Reporting Bugs + +Before submitting a new bug report please search for an existing or similar report. + +Use one of our existing issue templates if you believe you've come across a unique problem. + +Duplicate issues, or issues that don't use one of our templates may get closed without a response. + +## Pull Request Conventions + +### Commits + +We use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/). + +When opening a pull request please be sure that either the pull request title, or each commit in the pull request, has one of the following prefixes: + + - `feat`: For when introducing a new feature. The result will be a new semver minor version of the package when it is next published. + - `fix`: For bug fixes. The result will be a new semver patch version of the package when it is next published. + - `docs`: For documentation updates. The result will be a new semver patch version of the package when it is next published. + - `chore`: For changes that do not affect the published module. Often these are changes to tests. The result will be *no* change to the version of the package when it is next published (as the commit does not affect the published version). + +### Test Coverage + +Pull requests made against this repo will run `npm test` automatically. Please make sure tests pass locally before submitting a PR. + +Every new feature or bug fix should come with a corresponding test or tests that validate the solutions. Testing also reports on code coverage and will fail if code coverage drops. + +### Linting + +Linting is also done automatically once tests pass. `npm run lintfix` will fix most linting errors automatically. + +Please make sure linting passes before submitting a PR. + +## What _not_ to contribute? + +### Dependencies + +It should be noted that our team does not accept third-party dependency updates/PRs. If you submit a PR trying to update our dependencies we will close it with or without a reference to these contribution guidelines. + +### Tools/Automation + +Our core team is responsible for the maintenance of the tooling/automation in this project and we ask contributors to not make changes to these when contributing (e.g. `.github/*`, `.eslintrc.json`, `.licensee.json`). Most of those files also have a header at the top to remind folks they are automatically generated. Pull requests that alter these will not be accepted. diff --git a/lib/content/CONTRIBUTING.md b/lib/content/CONTRIBUTING.md new file mode 100644 index 00000000..45aadf5c --- /dev/null +++ b/lib/content/CONTRIBUTING.md @@ -0,0 +1,48 @@ +# Contributing + +## Code of Conduct + +All interactions in the **npm** organization on GitHub are considered to be covered by our standard [Code of Conduct](https://docs.npmjs.com/policies/conduct). + +## Reporting Bugs + +Before submitting a new bug report please search for an existing or similar report. + +Use one of our existing issue templates if you believe you've come across a unique problem. + +Duplicate issues, or issues that don't use one of our templates may get closed without a response. + +## Pull Request Conventions + +### Commits + +We use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/). + +When opening a pull request please be sure that either the pull request title, or each commit in the pull request, has one of the following prefixes: + + - `feat`: For when introducing a new feature. The result will be a new semver minor version of the package when it is next published. + - `fix`: For bug fixes. The result will be a new semver patch version of the package when it is next published. + - `docs`: For documentation updates. The result will be a new semver patch version of the package when it is next published. + - `chore`: For changes that do not affect the published module. Often these are changes to tests. The result will be *no* change to the version of the package when it is next published (as the commit does not affect the published version). + +### Test Coverage + +Pull requests made against this repo will run `npm test` automatically. Please make sure tests pass locally before submitting a PR. + +Every new feature or bug fix should come with a corresponding test or tests that validate the solutions. Testing also reports on code coverage and will fail if code coverage drops. + +### Linting + +Linting is also done automatically once tests pass. `npm run lintfix` will fix most linting errors automatically. + +Please make sure linting passes before submitting a PR. + +## What _not_ to contribute? + +### Dependencies + +It should be noted that our team does not accept third-party dependency updates/PRs. If you submit a PR trying to update our dependencies we will close it with or without a reference to these contribution guidelines. + +### Tools/Automation + +Our core team is responsible for the maintenance of the tooling/automation in this project and we ask contributors to not make changes to these when contributing (e.g. `.github/*`, `.eslintrc.json`, `.licensee.json`). Most of those files also have a header at the top to remind folks they are automatically generated. Pull requests that alter these will not be accepted. diff --git a/lib/content/index.js b/lib/content/index.js index 01b30e1a..cb572e09 100644 --- a/lib/content/index.js +++ b/lib/content/index.js @@ -90,6 +90,7 @@ const rootModule = { '.npmrc': 'npmrc', 'SECURITY.md': 'SECURITY.md', 'CODE_OF_CONDUCT.md': 'CODE_OF_CONDUCT.md', + 'CONTRIBUTING.md': 'CONTRIBUTING.md', 'package.json': 'pkg.json', }, rm: [ diff --git a/tap-snapshots/test/apply/files-snapshots.js.test.cjs b/tap-snapshots/test/apply/files-snapshots.js.test.cjs index 4c79588e..ef9298fd 100644 --- a/tap-snapshots/test/apply/files-snapshots.js.test.cjs +++ b/tap-snapshots/test/apply/files-snapshots.js.test.cjs @@ -27,6 +27,7 @@ exports[`test/apply/files-snapshots.js TAP private workspace > expect resolving .npmrc .release-please-manifest.json CODE_OF_CONDUCT.md +CONTRIBUTING.md package.json release-please-config.json SECURITY.md @@ -83,6 +84,7 @@ exports[`test/apply/files-snapshots.js TAP turn off repo > expect resolving Prom .gitignore .npmrc CODE_OF_CONDUCT.md +CONTRIBUTING.md package.json SECURITY.md ` @@ -111,6 +113,7 @@ exports[`test/apply/files-snapshots.js TAP turn off specific files > expect reso .npmrc .release-please-manifest.json CODE_OF_CONDUCT.md +CONTRIBUTING.md package.json release-please-config.json SECURITY.md diff --git a/tap-snapshots/test/apply/source-snapshots.js.test.cjs b/tap-snapshots/test/apply/source-snapshots.js.test.cjs index 92e96a96..efb62ed0 100644 --- a/tap-snapshots/test/apply/source-snapshots.js.test.cjs +++ b/tap-snapshots/test/apply/source-snapshots.js.test.cjs @@ -1226,6 +1226,7 @@ jobs: !/bin/ !/CHANGELOG* !/CODE_OF_CONDUCT.md +!/CONTRIBUTING.md !/docs/ !/lib/ !/LICENSE* @@ -1260,6 +1261,59 @@ Conduct](https://docs.npmjs.com/policies/conduct) The npm cli team may, at its own discretion, moderate, remove, or edit any interactions such as pull requests, issues, and comments. +CONTRIBUTING.md +======================================== + + +# Contributing + +## Code of Conduct + +All interactions in the **npm** organization on GitHub are considered to be covered by our standard [Code of Conduct](https://docs.npmjs.com/policies/conduct). + +## Reporting Bugs + +Before submitting a new bug report please search for an existing or similar report. + +Use one of our existing issue templates if you believe you've come across a unique problem. + +Duplicate issues, or issues that don't use one of our templates may get closed without a response. + +## Pull Request Conventions + +### Commits + +We use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/). + +When opening a pull request please be sure that either the pull request title, or each commit in the pull request, has one of the following prefixes: + + - \`feat\`: For when introducing a new feature. The result will be a new semver minor version of the package when it is next published. + - \`fix\`: For bug fixes. The result will be a new semver patch version of the package when it is next published. + - \`docs\`: For documentation updates. The result will be a new semver patch version of the package when it is next published. + - \`chore\`: For changes that do not affect the published module. Often these are changes to tests. The result will be *no* change to the version of the package when it is next published (as the commit does not affect the published version). + +### Test Coverage + +Pull requests made against this repo will run \`npm test\` automatically. Please make sure tests pass locally before submitting a PR. + +Every new feature or bug fix should come with a corresponding test or tests that validate the solutions. Testing also reports on code coverage and will fail if code coverage drops. + +### Linting + +Linting is also done automatically once tests pass. \`npm run lintfix\` will fix most linting errors automatically. + +Please make sure linting passes before submitting a PR. + +## What _not_ to contribute? + +### Dependencies + +It should be noted that our team does not accept third-party dependency updates/PRs. If you submit a PR trying to update our dependencies we will close it with or without a reference to these contribution guidelines. + +### Tools/Automation + +Our core team is responsible for the maintenance of the tooling/automation in this project and we ask contributors to not make changes to these when contributing (e.g. \`.github/*\`, \`.eslintrc.json\`, \`.licensee.json\`). Most of those files also have a header at the top to remind folks they are automatically generated. Pull requests that alter these will not be accepted. + package.json ======================================== { @@ -2851,6 +2905,7 @@ jobs: !/bin/ !/CHANGELOG* !/CODE_OF_CONDUCT.md +!/CONTRIBUTING.md !/docs/ !/lib/ !/LICENSE* @@ -2891,6 +2946,59 @@ Conduct](https://docs.npmjs.com/policies/conduct) The npm cli team may, at its own discretion, moderate, remove, or edit any interactions such as pull requests, issues, and comments. +CONTRIBUTING.md +======================================== + + +# Contributing + +## Code of Conduct + +All interactions in the **npm** organization on GitHub are considered to be covered by our standard [Code of Conduct](https://docs.npmjs.com/policies/conduct). + +## Reporting Bugs + +Before submitting a new bug report please search for an existing or similar report. + +Use one of our existing issue templates if you believe you've come across a unique problem. + +Duplicate issues, or issues that don't use one of our templates may get closed without a response. + +## Pull Request Conventions + +### Commits + +We use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/). + +When opening a pull request please be sure that either the pull request title, or each commit in the pull request, has one of the following prefixes: + + - \`feat\`: For when introducing a new feature. The result will be a new semver minor version of the package when it is next published. + - \`fix\`: For bug fixes. The result will be a new semver patch version of the package when it is next published. + - \`docs\`: For documentation updates. The result will be a new semver patch version of the package when it is next published. + - \`chore\`: For changes that do not affect the published module. Often these are changes to tests. The result will be *no* change to the version of the package when it is next published (as the commit does not affect the published version). + +### Test Coverage + +Pull requests made against this repo will run \`npm test\` automatically. Please make sure tests pass locally before submitting a PR. + +Every new feature or bug fix should come with a corresponding test or tests that validate the solutions. Testing also reports on code coverage and will fail if code coverage drops. + +### Linting + +Linting is also done automatically once tests pass. \`npm run lintfix\` will fix most linting errors automatically. + +Please make sure linting passes before submitting a PR. + +## What _not_ to contribute? + +### Dependencies + +It should be noted that our team does not accept third-party dependency updates/PRs. If you submit a PR trying to update our dependencies we will close it with or without a reference to these contribution guidelines. + +### Tools/Automation + +Our core team is responsible for the maintenance of the tooling/automation in this project and we ask contributors to not make changes to these when contributing (e.g. \`.github/*\`, \`.eslintrc.json\`, \`.licensee.json\`). Most of those files also have a header at the top to remind folks they are automatically generated. Pull requests that alter these will not be accepted. + package.json ======================================== { diff --git a/tap-snapshots/test/check/snapshots.js.test.cjs b/tap-snapshots/test/check/snapshots.js.test.cjs index bcd9db8b..c7bdff3f 100644 --- a/tap-snapshots/test/check/snapshots.js.test.cjs +++ b/tap-snapshots/test/check/snapshots.js.test.cjs @@ -56,6 +56,7 @@ The following module files need to be added: .gitignore .npmrc CODE_OF_CONDUCT.md + CONTRIBUTING.md SECURITY.md To correct it: npx template-oss-apply --force @@ -133,6 +134,7 @@ To correct it: move files to not match one of the following patterns: !/bin/ !/CHANGELOG* !/CODE_OF_CONDUCT.md + !/CONTRIBUTING.md !/docs/ !/lib/ !/LICENSE* @@ -171,6 +173,7 @@ To correct it: move files to not match one of the following patterns: !/bin/ !/CHANGELOG* !/CODE_OF_CONDUCT.md + !/CONTRIBUTING.md !/docs/ !/lib/ !/LICENSE* @@ -304,6 +307,7 @@ The following module files need to be added: .gitignore .npmrc CODE_OF_CONDUCT.md + CONTRIBUTING.md SECURITY.md To correct it: npx template-oss-apply --force From 816d8d64ff9bee19ecfc2e998f8b7e3cd385f71e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 3 May 2023 17:30:21 +0000 Subject: [PATCH 09/11] chore: release 4.15.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 14 ++++++++++++++ package.json | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 666e52c6..79ae23c2 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "4.14.1" + ".": "4.15.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e50761a..7fc8d67b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [4.15.0](https://github.com/npm/template-oss/compare/v4.14.1...v4.15.0) (2023-05-03) + +### Features + +* [`96776b4`](https://github.com/npm/template-oss/commit/96776b44d73e4695d1ddad07d9104830baa61f11) [#312](https://github.com/npm/template-oss/pull/312) add CONTRIBUTING.md (#312) (@wraithgar) +* [`be7f16a`](https://github.com/npm/template-oss/commit/be7f16a3662fbd2c0c5dacdf0b559f88dde81f7a) [#310](https://github.com/npm/template-oss/pull/310) add probot settings template (#310) (@nlf) + +### Bug Fixes + +* [`238fc4a`](https://github.com/npm/template-oss/commit/238fc4ae07fc9d05454c7f478dfe980b393c10f5) [#309](https://github.com/npm/template-oss/pull/309) pull PR_TITLE into env (@wraithgar) +* [`1edde27`](https://github.com/npm/template-oss/commit/1edde270606255276dc30ef1526970cac1b30644) [#308](https://github.com/npm/template-oss/pull/308) add the -R flag to the post-publish action for easier copy/paste (#308) (@nlf) +* [`1babe54`](https://github.com/npm/template-oss/commit/1babe54a8db71b40cf0eaabf3ee056796ba333ae) [#306](https://github.com/npm/template-oss/pull/306) use a more portable means of spawning subshells (#306) (@nlf) +* [`7a2481c`](https://github.com/npm/template-oss/commit/7a2481c7312a539bfdba6881ac8fbadae41c64b9) [#305](https://github.com/npm/template-oss/pull/305) update the LouisBrunner/checks-action to latest (#305) (@nlf) + ## [4.14.1](https://github.com/npm/template-oss/compare/v4.14.0...v4.14.1) (2023-04-19) ### Bug Fixes diff --git a/package.json b/package.json index 2286dd64..fc03f66d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/template-oss", - "version": "4.14.1", + "version": "4.15.0", "description": "templated files used in npm CLI team oss projects", "main": "lib/content/index.js", "bin": { From 6f5a2533dadb48edc822a798a2cdda3dcd3e20b0 Mon Sep 17 00:00:00 2001 From: nlf Date: Wed, 3 May 2023 12:45:26 -0700 Subject: [PATCH 10/11] fix: make settings file actually work (#313) the settings file as it was before didn't actually apply branch protection rules, i've fixed that issue here and tested in the `publish-test` repo to ensure all settings present in the file actually do get applied --- .github/settings.yml | 23 ++----- lib/content/settings.yml | 18 ++--- .../test/apply/source-snapshots.js.test.cjs | 69 ++++++------------- 3 files changed, 37 insertions(+), 73 deletions(-) diff --git a/.github/settings.yml b/.github/settings.yml index 50a51aff..107aa0ad 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -13,23 +13,14 @@ repository: 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: + enforce_admins: true required_pull_request_reviews: - required_pull_request_review_count: 1 - dismiss_stale_reviews: true + required_approving_review_count: 1 require_code_owner_reviews: true + require_last_push_approval: true + dismiss_stale_reviews: true restrictions: - teams: - - "npm/cli-team" - enforce_admins: true - required_status_checks: null + apps: [] + users: [] + teams: [ "cli-team" ] diff --git a/lib/content/settings.yml b/lib/content/settings.yml index c61f1edf..0f90cec6 100644 --- a/lib/content/settings.yml +++ b/lib/content/settings.yml @@ -9,16 +9,16 @@ repository: enable_vulnerability_alerts: true branches: - {{#each branches}} - - name: {{ . }} + - name: {{ defaultBranch }} protection: + required_status_checks: null + enforce_admins: true required_pull_request_reviews: - required_pull_request_review_count: 1 - dismiss_stale_reviews: true + required_approving_review_count: 1 require_code_owner_reviews: true + require_last_push_approval: true + dismiss_stale_reviews: true restrictions: - teams: - - "npm/cli-team" - enforce_admins: true - required_status_checks: null - {{/each}} + apps: [] + users: [] + teams: ["cli-team"] diff --git a/tap-snapshots/test/apply/source-snapshots.js.test.cjs b/tap-snapshots/test/apply/source-snapshots.js.test.cjs index efb62ed0..4a101dfa 100644 --- a/tap-snapshots/test/apply/source-snapshots.js.test.cjs +++ b/tap-snapshots/test/apply/source-snapshots.js.test.cjs @@ -180,26 +180,17 @@ repository: 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: + enforce_admins: true required_pull_request_reviews: - required_pull_request_review_count: 1 - dismiss_stale_reviews: true + required_approving_review_count: 1 require_code_owner_reviews: true + require_last_push_approval: true + dismiss_stale_reviews: true restrictions: - teams: - - "npm/cli-team" - enforce_admins: true - required_status_checks: null + apps: [] + users: [] + teams: [ "cli-team" ] .github/workflows/audit.yml ======================================== @@ -1625,26 +1616,17 @@ repository: 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: + enforce_admins: true required_pull_request_reviews: - required_pull_request_review_count: 1 - dismiss_stale_reviews: true + required_approving_review_count: 1 require_code_owner_reviews: true + require_last_push_approval: true + dismiss_stale_reviews: true restrictions: - teams: - - "npm/cli-team" - enforce_admins: true - required_status_checks: null + apps: [] + users: [] + teams: [ "cli-team" ] .github/workflows/audit.yml ======================================== @@ -3346,26 +3328,17 @@ repository: 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: + enforce_admins: true required_pull_request_reviews: - required_pull_request_review_count: 1 - dismiss_stale_reviews: true + required_approving_review_count: 1 require_code_owner_reviews: true + require_last_push_approval: true + dismiss_stale_reviews: true restrictions: - teams: - - "npm/cli-team" - enforce_admins: true - required_status_checks: null + apps: [] + users: [] + teams: [ "cli-team" ] .github/workflows/ci-a.yml ======================================== From 476967a4f940e0b7a7a32f39d975e17e6d71ccfe Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 3 May 2023 19:46:30 +0000 Subject: [PATCH 11/11] chore: release 4.15.1 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 6 ++++++ package.json | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 79ae23c2..e5a652cc 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "4.15.0" + ".": "4.15.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 7fc8d67b..7ab7ebcb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [4.15.1](https://github.com/npm/template-oss/compare/v4.15.0...v4.15.1) (2023-05-03) + +### Bug Fixes + +* [`6f5a253`](https://github.com/npm/template-oss/commit/6f5a2533dadb48edc822a798a2cdda3dcd3e20b0) [#313](https://github.com/npm/template-oss/pull/313) make settings file actually work (#313) (@nlf) + ## [4.15.0](https://github.com/npm/template-oss/compare/v4.14.1...v4.15.0) (2023-05-03) ### Features diff --git a/package.json b/package.json index fc03f66d..0be5f3ef 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/template-oss", - "version": "4.15.0", + "version": "4.15.1", "description": "templated files used in npm CLI team oss projects", "main": "lib/content/index.js", "bin": {