Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/repository-hygiene.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Repository hygiene

on:
pull_request:
push:
branches:
- master

permissions:
contents: read

concurrency:
group: repository-hygiene-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
tracked-dependency-output:
name: Reject tracked dependency output
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Assert dependency output is untracked
shell: bash
run: |
set -euo pipefail

mapfile -d '' tracked_files < <(git ls-files -z -- ':(glob)**/node_modules/**')

if (( ${#tracked_files[@]} > 0 )); then
printf '::error::Dependency output must not be committed. Remove these tracked files:\n'
printf ' - %q\n' "${tracked_files[@]}"
exit 1
fi

printf 'Repository hygiene assertion: PASS\n'
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.DS_Store
.idea
node_modules
# Local dependency installation output.
/node_modules/
27 changes: 0 additions & 27 deletions node_modules/are-we-there-yet/CHANGES.md~

This file was deleted.

140 changes: 0 additions & 140 deletions node_modules/console-control-strings/README.md~

This file was deleted.

40 changes: 0 additions & 40 deletions node_modules/in-publish/README.md~

This file was deleted.