Skip to content

Setup pre-commit hooks and Copilot CI workflow#29

Merged
cormoran merged 5 commits into
mainfrom
copilot/setup-precommit-hook-github-actions
Feb 4, 2026
Merged

Setup pre-commit hooks and Copilot CI workflow#29
cormoran merged 5 commits into
mainfrom
copilot/setup-precommit-hook-github-actions

Conversation

Copilot AI commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

Enforces code quality gates before commits and in CI for Copilot-generated PRs.

Pre-commit Hook

  • Husky + lint-staged runs Prettier and ESLint on staged files only
  • Full test suite runs before commit succeeds
  • prepare script auto-installs hooks on npm install

CI Workflow

.github/workflows/copilot.yml runs on PRs and copilot/** branches:

  • Format check (Prettier)
  • Lint (ESLint)
  • Tests (Jest)
  • Build (Vite)

Configuration

Prettier (.prettierrc):

  • Standard settings: semi-colons, trailing commas, double quotes, 80-width
  • Excludes dist, node_modules, coverage, generated proto files

lint-staged (in package.json):

{
  "*.{ts,tsx}": ["prettier --write", "eslint --fix"],
  "*.{json,md,yml,yaml}": ["prettier --write"]
}

Scripts

npm run format         # Format all files
npm run format:check   # Verify formatting

Formatted existing codebase to establish baseline.

Original prompt

Please setup git pre-commit hook in the project and github actions for copilot.
test, lint and format should pass before commit.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits February 4, 2026 14:17
Co-authored-by: cormoran <7994064+cormoran@users.noreply.github.com>
Co-authored-by: cormoran <7994064+cormoran@users.noreply.github.com>
Copilot AI changed the title [WIP] Setup git pre-commit hook and GitHub Actions Setup pre-commit hooks and Copilot CI workflow Feb 4, 2026
Copilot AI requested a review from cormoran February 4, 2026 14:25
@github-actions

github-actions Bot commented Feb 4, 2026

Copy link
Copy Markdown

🚀 Cloudflare Workers Preview

Preview URL: https://1e9509a3-dya-studio.cormoran707.workers.dev

Deployed from commit 6063b8c

@cormoran
cormoran marked this pull request as ready for review February 4, 2026 15:26
@cormoran
cormoran merged commit 8afc982 into main Feb 4, 2026
4 checks passed
@cormoran
cormoran deleted the copilot/setup-precommit-hook-github-actions branch February 7, 2026 13:59
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.

2 participants