Skip to content

ATLAS-5293: ATLAS UI: Add repo-wide Git hooks and dashboard pre-commit/push verification#631

Open
pawarprasad123 wants to merge 2 commits into
masterfrom
ATLAS-5293
Open

ATLAS-5293: ATLAS UI: Add repo-wide Git hooks and dashboard pre-commit/push verification#631
pawarprasad123 wants to merge 2 commits into
masterfrom
ATLAS-5293

Conversation

@pawarprasad123
Copy link
Copy Markdown
Contributor

@pawarprasad123 pawarprasad123 commented May 14, 2026

What changes were proposed in this pull request?

This PR adds local Git automation for the whole Atlas repo so contributors catch issues before a PR: license headers on new files, ESLint on staged dashboard sources (via lint-staged), TypeScript tsc --noEmit for the dashboard when dashboard/ is staged, and for dashboardv2/ and docs/ lighter checks (ASF license + node --check on pre-commit; npm run build on pre-push). It does not add Jest or test files; those are PR 2+.

What it does

Root .githooks/pre-commit and .githooks/pre-push call scripts/git-hooks/run-precommit.mjs and run-prepush.mjs.
scripts/git-hooks/: Orchestrates dashboard (existing verify scripts + lint-staged + typecheck), v2/docs license + syntax, v2/docs build on push.
dashboard/scripts/install-git-hooks.mjs: Sets git config core.hooksPath .githooks at repo root (run via npm install in dashboard/ prepare).
dashboard/.githooks/: Forwarders to root hooks for compatibility.
dashboard/lint-staged.config.mjs: ESLint only on staged dashboard/src/**/
.{ts,tsx}.
dashboard/docs/GIT_HOOKS.md: When/what/where, skip env vars, manual commands (node scripts/git-hooks/run-precommit.mjs from repo root).
Setup on another machine

cd /path/to/atlas
git config core.hooksPath .githooks
or cd dashboard && npm install
Verify: git config --get core.hooksPath → .githooks

How was this patch tested?

Manual test, build pass
image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant