[
https://issues.apache.org/jira/browse/ATLAS-5293?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Prasad P. Pawar updated ATLAS-5293:
-----------------------------------
Description:
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 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
{code:java}
cd /path/to/atlas {code}
{code:java}
git config core.hooksPath .githooks {code}
or {{cd dashboard && npm install}}
Verify: {{git config --get core.hooksPath}} → {{.githooks}}
was:
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 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).
> ATLAS UI: Add repo-wide Git hooks and dashboard pre-commit/push verification
> ----------------------------------------------------------------------------
>
> Key: ATLAS-5293
> URL: https://issues.apache.org/jira/browse/ATLAS-5293
> Project: Atlas
> Issue Type: Sub-task
> Components: atlas-webui
> Affects Versions: 3.0.0
> Reporter: Prasad P. Pawar
> Assignee: Prasad P. Pawar
> Priority: Major
> Labels: Atlas-UI
>
> 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 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
>
> {code:java}
> cd /path/to/atlas {code}
> {code:java}
> git config core.hooksPath .githooks {code}
>
> or {{cd dashboard && npm install}}
> Verify: {{git config --get core.hooksPath}} → {{.githooks}}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)