瀏覽代碼

chore: Remove changelog check and graphql (#2639)

Lipis 4 年之前
父節點
當前提交
14759d5b72
共有 4 個文件被更改,包括 1 次插入96 次删除
  1. 0 27
      .github/workflows/changelog-check.yml
  2. 0 33
      .github/workflows/codeql-analysis.yml
  3. 1 2
      package.json
  4. 0 34
      scripts/changelog-check.js

+ 0 - 27
.github/workflows/changelog-check.yml

@@ -1,27 +0,0 @@
-name: Changelog in sync for packages
-
-on:
-  push:
-    branches:
-      - master
-  pull_request:
-jobs:
-  test:
-    runs-on: ubuntu-latest
-
-    steps:
-      - uses: actions/checkout@v1
-      - name: Setup Node.js 14.x
-        uses: actions/setup-node@v1
-        with:
-          node-version: 14.x
-      - name: Install and run changelog check
-        run:
-          if [[ $GITHUB_HEAD_REF =~ dependabot || $GITHUB_HEAD_REF == "l10n_master" ]]; then
-          echo "Skipping running changelog check";
-          else
-          npm ci;
-          npm run changelog:check;
-          fi
-        env:
-          CI: true

+ 0 - 33
.github/workflows/codeql-analysis.yml

@@ -1,33 +0,0 @@
-name: "CodeQL"
-
-on:
-  push:
-    branches: [master]
-  pull_request:
-    branches: [master]
-  schedule:
-    - cron: "18 7 * * 0"
-
-jobs:
-  analyze:
-    name: Analyze
-    runs-on: ubuntu-latest
-
-    strategy:
-      fail-fast: false
-      matrix:
-        language: ["typescript"]
-
-    steps:
-      - name: Checkout repository
-        uses: actions/checkout@v2
-
-      - name: Initialize CodeQL
-        uses: github/codeql-action/init@v1
-        with:
-          languages: ${{ matrix.language }}
-      - name: Autobuild
-        uses: github/codeql-action/autobuild@v1
-
-      - name: Perform CodeQL Analysis
-        uses: github/codeql-action/analyze@v1

+ 1 - 2
package.json

@@ -100,7 +100,6 @@
     "test:other": "npm run prettier -- --list-different",
     "test:other": "npm run prettier -- --list-different",
     "test:typecheck": "tsc",
     "test:typecheck": "tsc",
     "test:update": "npm run test:app -- --updateSnapshot --watchAll=false",
     "test:update": "npm run test:app -- --updateSnapshot --watchAll=false",
-    "test": "npm run test:app",
-    "changelog:check": "node ./scripts/changelog-check.js"
+    "test": "npm run test:app"
   }
   }
 }
 }

+ 0 - 34
scripts/changelog-check.js

@@ -1,34 +0,0 @@
-const { exec } = require("child_process");
-
-const normalizePath = (path) => path.replace(/\\+/g, "/").trim().toLowerCase();
-
-const IGNORED_PATHS = [
-  "src/excalidraw-app",
-  "packages/utils",
-  "CHANGELOG.md",
-  "README.md",
-].map(normalizePath);
-
-exec("git diff origin/master --cached --name-only", (error, stdout, stderr) => {
-  if (error || stderr) {
-    process.exit(1);
-  }
-
-  if (!stdout || stdout.includes("packages/excalidraw/CHANGELOG.md")) {
-    process.exit(0);
-  }
-
-  const changedFiles = stdout.trim().split("\n").map(normalizePath);
-
-  const excalidrawPackageFiles = changedFiles.filter((filename) => {
-    return (
-      filename.includes("src") &&
-      !IGNORED_PATHS.find((ignoredPath) => filename.includes(ignoredPath))
-    );
-  });
-
-  if (excalidrawPackageFiles.length) {
-    process.exit(1);
-  }
-  process.exit(0);
-});