From aa0c82d7b62ff15a8f4c841c2a77ff6f175bb41f Mon Sep 17 00:00:00 2001 From: Luke Karrys Date: Thu, 25 Aug 2022 12:41:34 -0700 Subject: [PATCH] chore: postinstall for dependabot template-oss PR --- .eslintrc.js | 2 ++ .github/matchers/tap.json | 32 +++++++++++++++++++++++++++ .github/workflows/audit.yml | 10 ++++----- .github/workflows/ci.yml | 18 ++++++++------- .github/workflows/codeql-analysis.yml | 8 +++---- .github/workflows/post-dependabot.yml | 11 +++++---- .github/workflows/pull-request.yml | 4 ++-- .gitignore | 1 + CODE_OF_CONDUCT.md | 7 ++++++ package.json | 2 +- 10 files changed, 69 insertions(+), 26 deletions(-) create mode 100644 .github/matchers/tap.json create mode 100644 CODE_OF_CONDUCT.md diff --git a/.eslintrc.js b/.eslintrc.js index 0e8ad00..5db9f81 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,5 +1,7 @@ /* This file is automatically added by @npmcli/template-oss. Do not edit. */ +'use strict' + const { readdirSync: readdir } = require('fs') const localConfigs = readdir(__dirname) diff --git a/.github/matchers/tap.json b/.github/matchers/tap.json new file mode 100644 index 0000000..ef11419 --- /dev/null +++ b/.github/matchers/tap.json @@ -0,0 +1,32 @@ +{ + "//@npmcli/template-oss": "This file is automatically added by @npmcli/template-oss. Do not edit.", + "problemMatcher": [ + { + "owner": "tap", + "pattern": [ + { + "regexp": "^\\s*not ok \\d+ - (.*)", + "message": 1 + }, + { + "regexp": "^\\s*---" + }, + { + "regexp": "^\\s*at:" + }, + { + "regexp": "^\\s*line:\\s*(\\d+)", + "line": 1 + }, + { + "regexp": "^\\s*column:\\s*(\\d+)", + "column": 1 + }, + { + "regexp": "^\\s*file:\\s*(.*)", + "file": 1 + } + ] + } + ] +} \ No newline at end of file diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml index 549243a..d46429e 100644 --- a/.github/workflows/audit.yml +++ b/.github/workflows/audit.yml @@ -5,8 +5,8 @@ name: Audit on: workflow_dispatch: schedule: - # "At 01:00 on Monday" https://crontab.guru/#0_1_*_*_1 - - cron: "0 1 * * 1" + # "At 08:00 UTC (01:00 PT) on Monday" https://crontab.guru/#0_8_*_*_1 + - cron: "0 8 * * 1" jobs: audit: @@ -15,13 +15,13 @@ jobs: - uses: actions/checkout@v3 - name: Setup git user run: | - git config --global user.email "ops+npm-cli@npmjs.com" - git config --global user.name "npm cli ops bot" + git config --global user.email "npm-cli+bot@github.com" + git config --global user.name "npm CLI robot" - uses: actions/setup-node@v3 with: node-version: 16.x - name: Update npm to latest run: npm i --prefer-online --no-fund --no-audit -g npm@latest - run: npm -v - - run: npm i --ignore-scripts --package-lock + - run: npm i --ignore-scripts --no-audit --no-fund --package-lock - run: npm audit diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8067c86..3671e3b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,8 +12,8 @@ on: - main - latest schedule: - # "At 02:00 on Monday" https://crontab.guru/#0_2_*_*_1 - - cron: "0 2 * * 1" + # "At 09:00 UTC (02:00 PT) on Monday" https://crontab.guru/#0_9_*_*_1 + - cron: "0 9 * * 1" jobs: lint: @@ -22,15 +22,15 @@ jobs: - uses: actions/checkout@v3 - name: Setup git user run: | - git config --global user.email "ops+npm-cli@npmjs.com" - git config --global user.name "npm cli ops bot" + git config --global user.email "npm-cli+bot@github.com" + git config --global user.name "npm CLI robot" - uses: actions/setup-node@v3 with: node-version: 16.x - name: Update npm to latest run: npm i --prefer-online --no-fund --no-audit -g npm@latest - run: npm -v - - run: npm i --ignore-scripts + - run: npm i --ignore-scripts --no-audit --no-fund - run: npm run lint test: @@ -59,8 +59,8 @@ jobs: - uses: actions/checkout@v3 - name: Setup git user run: | - git config --global user.email "ops+npm-cli@npmjs.com" - git config --global user.name "npm cli ops bot" + git config --global user.email "npm-cli+bot@github.com" + git config --global user.name "npm CLI robot" - uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} @@ -82,5 +82,7 @@ jobs: if: ${{ !startsWith(matrix.node-version, '10.') }} run: npm i --prefer-online --no-fund --no-audit -g npm@latest - run: npm -v - - run: npm i --ignore-scripts + - name: add tap problem matcher + run: echo "::add-matcher::.github/matchers/tap.json" + - run: npm i --ignore-scripts --no-audit --no-fund - run: npm test --ignore-scripts diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 56cd7b9..cfd0db3 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -13,8 +13,8 @@ on: - main - latest schedule: - # "At 03:00 on Monday" https://crontab.guru/#0_3_*_*_1 - - cron: "0 3 * * 1" + # "At 10:00 UTC (03:00 PT) on Monday" https://crontab.guru/#0_10_*_*_1 + - cron: "0 10 * * 1" jobs: analyze: @@ -34,8 +34,8 @@ jobs: - uses: actions/checkout@v3 - name: Setup git user run: | - git config --global user.email "ops+npm-cli@npmjs.com" - git config --global user.name "npm cli ops bot" + git config --global user.email "npm-cli+bot@github.com" + git config --global user.name "npm CLI robot" - name: Initialize CodeQL uses: github/codeql-action/init@v1 with: diff --git a/.github/workflows/post-dependabot.yml b/.github/workflows/post-dependabot.yml index dde8486..b6e81e6 100644 --- a/.github/workflows/post-dependabot.yml +++ b/.github/workflows/post-dependabot.yml @@ -4,21 +4,20 @@ name: Post Dependabot Actions on: pull_request -# https://docs.github.com/en/rest/overview/permissions-required-for-github-apps +# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions permissions: - actions: write contents: write jobs: - Install: + template-oss-apply: runs-on: ubuntu-latest if: github.actor == 'dependabot[bot]' steps: - uses: actions/checkout@v3 - name: Setup git user run: | - git config --global user.email "ops+npm-cli@npmjs.com" - git config --global user.name "npm cli ops bot" + git config --global user.email "npm-cli+bot@github.com" + git config --global user.name "npm CLI robot" - uses: actions/setup-node@v3 with: node-version: 16.x @@ -36,7 +35,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | gh pr checkout ${{ github.event.pull_request.number }} - npm install --ignore-scripts + npm install --ignore-scripts --no-audit --no-fund npm run template-oss-apply git add . git commit -am "chore: postinstall for dependabot template-oss PR" diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 93a5c3c..7223076 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -20,8 +20,8 @@ jobs: fetch-depth: 0 - name: Setup git user run: | - git config --global user.email "ops+npm-cli@npmjs.com" - git config --global user.name "npm cli ops bot" + git config --global user.email "npm-cli+bot@github.com" + git config --global user.name "npm CLI robot" - uses: actions/setup-node@v3 with: node-version: 16.x diff --git a/.gitignore b/.gitignore index bf011b1..be5771f 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,7 @@ !/.github/ !/.gitignore !/.npmrc +!/CODE_OF_CONDUCT.md !/SECURITY.md !/bin/ !/lib/ diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..167043c --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,7 @@ + + +All interactions in this repo are covered by the [npm Code of +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. diff --git a/package.json b/package.json index 8f440c6..e3c598c 100644 --- a/package.json +++ b/package.json @@ -50,6 +50,6 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "3.2.2" + "version": "3.6.0" } }