Skip to content

Latest commit

 

History

History
69 lines (43 loc) · 1.96 KB

File metadata and controls

69 lines (43 loc) · 1.96 KB

Contributing to Gitbank

Thanks for your interest in contributing. Here is everything you need to know.

Before you start

  • Open an issue first for non-trivial changes so we can discuss the approach
  • For bugs, include steps to reproduce and the expected vs actual behavior
  • For features, describe the use case and why it belongs in the core protocol

Project conventions

Smart contract changes

  1. Edit Solidity in src/
  2. Compile: npx hardhat compile
  3. Update tests in test/
  4. All tests must pass before opening a PR

API changes

The API contract lives in api-spec/openapi.yaml. This is the source of truth.

  1. Edit the OpenAPI spec first
  2. Run codegen: pnpm --filter @workspace/api-spec run codegen
  3. Implement the route in api-server/src/routes/
  4. Use generated Zod schemas for input/output validation
  5. Use generated React Query hooks in the frontend

Never edit files in api-zod/src/generated/ or api-client/src/generated/ directly.

Database changes

The schema lives in db/src/schema/index.ts.

  1. Edit the schema
  2. Run: pnpm --filter @workspace/db run push (dev only)
  3. For production, generate and apply a migration

Logging

Never use console.log in server code. Use req.log in route handlers.

UI scope

The web UI is intentionally limited to onboarding and monitoring. Do not add UI for operations that should be bot commands. All vault, project, and bounty actions happen via @gitbankbot mentions.

Type checking

pnpm run typecheck

This must pass with zero errors before opening a PR.

Pull requests

  • Keep PRs focused - one concern per PR
  • Write a clear description of what changed and why
  • Reference related issues with Closes #<number>
  • Do not bump version numbers - maintainers handle releases

Code of conduct

Be direct and respectful. Treat others the way you want to be treated.

License

By contributing, you agree that your contributions will be licensed under the Apache License 2.0.