Skip to content

Latest commit

 

History

History
108 lines (76 loc) · 1.5 KB

File metadata and controls

108 lines (76 loc) · 1.5 KB

Contribution Guide

Prerequisites

  • Node.js (20)
  • Go (for backend development)
  • Docker (for local testing)

Setup

  1. Set up git hooks:
git config core.hooksPath .githooks
  1. Install dependencies:
npm install
  1. Build backend plugin binaries:
mage -v

Development Workflow

  1. Build plugin in development mode:
npm run dev
  1. Run tests:
# Frontend tests
# Watch mode for development
npm run test

# CI mode
npm run test:ci

# Backend tests
npm run test:go
# or
mage test
# or
go test ./pkg/plugin/... -v
  1. Run linter:
# Frontend linter
npm run lint
# or
npm run lint:fix

# Backend linter
npm run lint:backend
  1. Local testing with Grafana:
npm run server

or with hot-reloading of backend plugin changes:

npm run server:watch
  1. Run E2E tests:
npm run server
npm run e2e

Contributing

Creating Issues

  1. Search existing issues to avoid duplicates
  2. Use a clear, descriptive title
  3. Include steps to reproduce if reporting a bug
  4. Provide context and examples for feature requests

Creating Pull Requests

  1. Create a feature branch from main
  2. Make focused, atomic commits with clear messages
  3. Run tests and linting locally
  4. Add or update unit tests for new functionality
  5. Ensure all existing tests pass
  6. Update documentation if needed
  7. Submit PR with description of changes, and add a reviewer from the Sift team
  8. Respond to review feedback

License

Apache-2.0