fix(git-id-switcher): replace broken Snyk badge with static shield #152
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Hash Check | |
| on: | |
| pull_request: | |
| paths: | |
| # Monorepo root documentation (all .md files + LICENSE) | |
| - '*.md' | |
| - 'LICENSE' | |
| # Extension documentation (add new extensions here) | |
| - 'extensions/git-id-switcher/**/*.md' | |
| - 'extensions/git-id-switcher/LICENSE' | |
| - 'extensions/git-id-switcher/src/ui/documentationInternal.ts' | |
| permissions: | |
| contents: read | |
| jobs: | |
| check-hashes: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false # Check all extensions even if one fails | |
| matrix: | |
| # Monorepo support: add new extensions here | |
| extension: | |
| - { dir: "git-id-switcher", name: "Git ID Switcher" } | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@f808768d1510423e83855289c910610ca9b43176 # v2.17.0 | |
| with: | |
| egress-policy: audit | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 | |
| with: | |
| node-version: '24' | |
| - name: Install dependencies | |
| working-directory: extensions/${{ matrix.extension.dir }} | |
| run: npm ci | |
| - name: Check hash consistency | |
| working-directory: extensions/${{ matrix.extension.dir }} | |
| run: | | |
| echo "Checking ${{ matrix.extension.name }} document hashes..." | |
| # Generate expected hashes (includes monorepo root files) | |
| node scripts/update-doc-hashes.mjs | |
| # Check if there are uncommitted changes | |
| if git diff --quiet src/ui/documentationInternal.ts; then | |
| echo "DOCUMENT_HASHES is up to date" | |
| else | |
| echo "" | |
| echo "DOCUMENT_HASHES is out of sync!" | |
| echo "" | |
| echo "This can happen when:" | |
| echo " - A .md file was added, modified, or deleted in the extension" | |
| echo " - A .md file at monorepo root was added, modified, or deleted" | |
| echo "" | |
| echo "Run the following command locally and commit the changes:" | |
| echo " cd extensions/${{ matrix.extension.dir }} && node scripts/update-doc-hashes.mjs" | |
| echo "" | |
| echo "Diff:" | |
| git diff src/ui/documentationInternal.ts | |
| exit 1 | |
| fi |