From 671fa42ca68d006b5fb5a10f4f7afc0ca389a747 Mon Sep 17 00:00:00 2001 From: Daniel Park Date: Sun, 23 May 2021 14:46:07 -0700 Subject: [PATCH] fix: npm prune & add pr verification checks (#3277) * wip: add wf * wip: add wf * wip: add wf * wip: add wf * wip: test clean git dir workflow * wip: fix deps and make link * wip: fix name * wip: undo change to install.js * wip: check git status * wip: use this version * wip: add missing npm-pack docs * wip: fix filename * wip: polish * wip: polish * wip: use pull request target only * wip: reset package lock --- .github/workflows/pr-validation-checks.yml | 46 ++++++++++++++++++++++ .gitignore | 1 + docs/content/commands/npm-pack.md | 9 +++++ 3 files changed, 56 insertions(+) create mode 100644 .github/workflows/pr-validation-checks.yml diff --git a/.github/workflows/pr-validation-checks.yml b/.github/workflows/pr-validation-checks.yml new file mode 100644 index 0000000000000..6b3cadb1c3eff --- /dev/null +++ b/.github/workflows/pr-validation-checks.yml @@ -0,0 +1,46 @@ +name: PR Validation Checks + +on: + # pull_request: + # types: + # - opened + # - edited + # - synchronize + # branches: + # - release-next + # - latest + pull_request_target: + types: + - opened + - edited + - synchronize + branches: + - release-next + - latest + +jobs: + pr-title-format: + runs-on: ubuntu-latest + steps: + - uses: amannn/action-semantic-pull-request@v3.4.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + clean-working-dir: + runs-on: ubuntu-latest + steps: + - name: Check out PR branch + uses: actions/checkout@v2 + with: + fetch-depth: 1 + ref: ${{ github.head_ref }} + repository: ${{ github.repository }} + token: ${{ secrets.GITHUB_TOKEN }} + - name: Install dependencies + run: | + node . install + - name: Check for diff + run: | + touch lib/utils/config/definitions.js + npm run postsnap + make prune diff --git a/.gitignore b/.gitignore index e704f5ad3484b..cbcf027f30343 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,4 @@ npm-debug.log /coverage /*.tgz /.editorconfig +.vscode/ \ No newline at end of file diff --git a/docs/content/commands/npm-pack.md b/docs/content/commands/npm-pack.md index ff90bd74472b4..04a22a5d854b4 100644 --- a/docs/content/commands/npm-pack.md +++ b/docs/content/commands/npm-pack.md @@ -27,6 +27,15 @@ commands that modify your local installation, eg, `install`, `update`, Note: This is NOT honored by other network related commands, eg `dist-tags`, `owner`, etc. +#### `json` + +* Default: false +* Type: Boolean + +Whether or not to output JSON data, rather than the normal output. + +Not supported by all npm commands. + #### `workspace` * Default: