π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Group repository checks by capability
Manav Rathi62995b7841bc
diff --git a/.github/scripts/change-approval.mjs b/.github/checks/change-approval/check.mjssimilarity index 99%rename from .github/scripts/change-approval.mjsrename to .github/checks/change-approval/check.mjsindex b09e6d4b36..c4d217e7e8 100644--- a/.github/scripts/change-approval.mjs+++ b/.github/checks/change-approval/check.mjs@@ -8,8 +8,11 @@ const routineBinary = (file) =>/\.(png|jpe?g|webp|gif|ico|icns|ttf|otf|woff2?|riv|mp3)$/i.test(file) || file.includes("Assets.xcassets/");const guardrailDirs = [".github/",+ "mobile/checks/","mobile/scripts/",+ "rust/checks/","rust/scripts/",+ "web/checks/","web/scripts/","server/scripts/","web/packages/build-config/",diff --git a/.github/scripts/change-approval.test.mjs b/.github/checks/change-approval/test.mjssimilarity index 96%rename from .github/scripts/change-approval.test.mjsrename to .github/checks/change-approval/test.mjsindex acf7a08246..99211a5670 100644--- a/.github/scripts/change-approval.test.mjs+++ b/.github/checks/change-approval/test.mjs@@ -5,7 +5,7 @@ import { tmpdir } from "node:os";import { dirname, join } from "node:path";import test from "node:test";-const script = join(import.meta.dirname, "change-approval.mjs");+const script = join(import.meta.dirname, "check.mjs");const env = {PATH: process.env.PATH,GIT_CONFIG_GLOBAL: "/dev/null",@@ -334,17 +334,27 @@ test("go.sum new module", (t) => {test("guardrail paths modified or deleted, not added", (t) => {const output = scan(t,- { ".github/scripts/x.mjs": "", ".github/workflows/x.yml": "on: push\n", "web/apps/x/eslint.config.mjs": "" },+ {+ ".github/scripts/x.mjs": "",+ ".github/workflows/x.yml": "on: push\n",+ "mobile/checks/x/check.rb": "",+ "rust/checks/x/check.py": "",+ "web/apps/x/eslint.config.mjs": "",+ "web/checks/x/check.mjs": "",+ },{".github/scripts/x.mjs": "export {};\n",".github/workflows/x.yml": "on: pull_request\n",+ "mobile/checks/x/check.rb": "\n",+ "rust/checks/x/check.py": "\n","web/apps/x/eslint.config.mjs": null,+ "web/checks/x/check.mjs": "\n",".github/CODEOWNERS": "",},);assert.equal(output,- "3 guardrail files\n\n## Guardrail changes\n\n- `.github/scripts/x.mjs`\n- `.github/workflows/x.yml`\n- `web/apps/x/eslint.config.mjs`\n\n",+ "6 guardrail files\n\n## Guardrail changes\n\n- `.github/scripts/x.mjs`\n- `.github/workflows/x.yml`\n- `mobile/checks/x/check.rb`\n- `rust/checks/x/check.py`\n- `web/apps/x/eslint.config.mjs`\n- `web/checks/x/check.mjs`\n\n",);});diff --git a/.github/scripts/check_workflow_security.rb b/.github/checks/workflow-security/check.rbsimilarity index 100%rename from .github/scripts/check_workflow_security.rbrename to .github/checks/workflow-security/check.rbdiff --git a/.github/workflows/change-approval.yml b/.github/workflows/change-approval.ymlindex 138b2e0be5..82af1d165a 100644--- a/.github/workflows/change-approval.yml+++ b/.github/workflows/change-approval.yml@@ -17,7 +17,7 @@ jobs:- name: Checkout PRuses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0- - run: node --test .github/scripts/change-approval.test.mjs+ - run: node --test .github/checks/change-approval/test.mjsdetect:runs-on: ubuntu-latest@@ -34,14 +34,12 @@ jobs:with:ref: ${{ github.event.pull_request.base.sha }}path: trusted- sparse-checkout: .github/scripts/change-approval.mjs+ sparse-checkout: .github/checks/change-approval/check.mjssparse-checkout-cone-mode: false- name: Scan changesid: scan- run: node "$scanner" ${{ github.event.pull_request.base.sha }}- env:- scanner: ${{ hashFiles('trusted/.github/scripts/change-approval.mjs') && 'trusted/.github/scripts/change-approval.mjs' || '.github/scripts/change-approval.mjs' }}+ run: node trusted/.github/checks/change-approval/check.mjs ${{ github.event.pull_request.base.sha }}approve:needs: detectdiff --git a/.github/workflows/mobile-lint.yml b/.github/workflows/mobile-lint.ymlindex 29cdbf781f..0380be67b3 100644--- a/.github/workflows/mobile-lint.yml+++ b/.github/workflows/mobile-lint.yml@@ -33,10 +33,10 @@ jobs:submodules: recursive- name: Verify frozen mobile pubspecs- run: ruby mobile/scripts/check_frozen_pubspecs.rb mobile+ run: ruby mobile/checks/frozen-pubspecs/check.rb mobile- name: Verify source ARB plurals- run: ruby mobile/scripts/check_source_arb_plurals.rb+ run: ruby mobile/checks/source-arb-plurals/check.rb- name: Verify auth custom iconsrun: |diff --git a/.github/workflows/workflow-security-checks.yml b/.github/workflows/workflow-security-checks.ymlindex c51f0438b2..ae6767b537 100644--- a/.github/workflows/workflow-security-checks.yml+++ b/.github/workflows/workflow-security-checks.yml@@ -5,7 +5,7 @@ on:paths:- '.github/workflows/**'- '.github/actions/**'- - '.github/scripts/check_workflow_security.rb'+ - '.github/checks/workflow-security/**'permissions:contents: read@@ -25,8 +25,8 @@ jobs:with:ref: ${{ github.event.pull_request.base.sha }}path: trusted- sparse-checkout: .github/scripts/check_workflow_security.rb+ sparse-checkout: .github/checks/workflow-security/check.rbsparse-checkout-cone-mode: false- name: Run workflow security checks- run: ruby trusted/.github/scripts/check_workflow_security.rb+ run: ruby trusted/.github/checks/workflow-security/check.rbdiff --git a/mobile/scripts/check_frozen_pubspecs.rb b/mobile/checks/frozen-pubspecs/check.rbsimilarity index 100%rename from mobile/scripts/check_frozen_pubspecs.rbrename to mobile/checks/frozen-pubspecs/check.rbdiff --git a/mobile/scripts/check_source_arb_plurals.rb b/mobile/checks/source-arb-plurals/check.rbsimilarity index 96%rename from mobile/scripts/check_source_arb_plurals.rbrename to mobile/checks/source-arb-plurals/check.rbindex ef2769233b..301cd1ab2f 100644--- a/mobile/scripts/check_source_arb_plurals.rb+++ b/mobile/checks/source-arb-plurals/check.rb@@ -3,7 +3,7 @@require "json"require "yaml"-MOBILE_ROOT = File.expand_path("..", __dir__)+MOBILE_ROOT = File.expand_path("../..", __dir__)EXACT_ONE_SELECTOR = /=1\s*\{/.freezedef source_arbsdiff --git a/rust/scripts/cargo-versions/check.py b/rust/checks/cargo-versions/check.pysimilarity index 100%rename from rust/scripts/cargo-versions/check.pyrename to rust/checks/cargo-versions/check.pydiff --git a/rust/scripts/cargo-versions/test.py b/rust/checks/cargo-versions/test.pysimilarity index 100%rename from rust/scripts/cargo-versions/test.pyrename to rust/checks/cargo-versions/test.pydiff --git a/rust/scripts/cargo-workspace-dependencies/check.py b/rust/checks/cargo-workspace-dependencies/check.pysimilarity index 100%rename from rust/scripts/cargo-workspace-dependencies/check.pyrename to rust/checks/cargo-workspace-dependencies/check.pydiff --git a/rust/scripts/cargo-workspace-dependencies/test.py b/rust/checks/cargo-workspace-dependencies/test.pysimilarity index 100%rename from rust/scripts/cargo-workspace-dependencies/test.pyrename to rust/checks/cargo-workspace-dependencies/test.pydiff --git a/rust/scripts/lint.sh b/rust/scripts/lint.shindex ca0fc2494f..16f93233c7 100755--- a/rust/scripts/lint.sh+++ b/rust/scripts/lint.sh@@ -4,10 +4,10 @@ set -euo pipefailcd "$(dirname "$0")/.."export RUSTFLAGS="-D warnings"-python3 scripts/cargo-versions/check.py ..-python3 scripts/cargo-versions/test.py-python3 scripts/cargo-workspace-dependencies/check.py ..-python3 scripts/cargo-workspace-dependencies/test.py+python3 checks/cargo-versions/check.py ..+python3 checks/cargo-versions/test.py+python3 checks/cargo-workspace-dependencies/check.py ..+python3 checks/cargo-workspace-dependencies/test.pycargo fmt --checkcargo clippy --locked --all-targets --features museum,ente-ml/ml-assetscargo auditdiff --git a/web/scripts/wasm-imports/entrypoints.mjs b/web/checks/wasm-imports/entrypoints.mjssimilarity index 100%rename from web/scripts/wasm-imports/entrypoints.mjsrename to web/checks/wasm-imports/entrypoints.mjsdiff --git a/web/scripts/wasm-imports/eslint.config.mjs b/web/checks/wasm-imports/eslint.config.mjssimilarity index 100%rename from web/scripts/wasm-imports/eslint.config.mjsrename to web/checks/wasm-imports/eslint.config.mjsdiff --git a/web/scripts/wasm-imports/test.mjs b/web/checks/wasm-imports/test.mjssimilarity index 100%rename from web/scripts/wasm-imports/test.mjsrename to web/checks/wasm-imports/test.mjsdiff --git a/web/package.json b/web/package.jsonindex 3bee38bffc..65ab375937 100644--- a/web/package.json+++ b/web/package.json@@ -33,7 +33,7 @@"build:space-wasm": "npm run build --workspace ente-space-wasm","build:twoof3": "npm exec --workspace twoof3 -- next build --webpack","build:wasm": "npm run build:core-wasm && npm run build:cast-wasm && npm run build:ensu-wasm && npm run build:legacy-wasm && npm run build:locker-wasm && npm run build:paste-wasm && npm run build:photos-wasm && npm run build:space-wasm",- "check:wasm-imports": "eslint --config scripts/wasm-imports/eslint.config.mjs --parser @typescript-eslint/parser --no-inline-config --max-warnings 0 apps packages && node scripts/wasm-imports/entrypoints.mjs && node --test scripts/wasm-imports/test.mjs",+ "check:wasm-imports": "eslint --config checks/wasm-imports/eslint.config.mjs --parser @typescript-eslint/parser --no-inline-config --max-warnings 0 apps packages && node checks/wasm-imports/entrypoints.mjs && node --test checks/wasm-imports/test.mjs","dev": "npm run dev:photos","dev:accounts": "npm run build:core-wasm && npm exec --workspace accounts -- next dev --webpack -p 3001","dev:albums": "npm run build:core-wasm && npm exec --workspace albums -- next dev --webpack -p 3002",