Files
react-telegram/.github/CONTRIBUTING.md
Kyle Fang f83027e79d feat: add comprehensive CI/CD pipeline with GitHub Actions
- Add CI workflow for testing, type checking, and building
- Add publish workflow for npm releases
- Add automated release workflow with changesets
- Add PR checks for changesets and formatting
- Add security scanning workflow
- Add documentation validation workflow
- Configure changesets for version management
- Add Prettier for code formatting
- Add unit tests for core and adapter packages
- Add contributing guidelines and release documentation
- Configure Dependabot for dependency updates
- Update README with CI badges

This establishes a complete CI/CD pipeline for automated testing,
versioning, and publishing of the React Telegram packages.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-01 10:10:22 +08:00

2.3 KiB

Contributing to React Telegram

Thank you for your interest in contributing to React Telegram! This document provides guidelines and instructions for contributing.

Development Setup

  1. Fork and clone the repository
  2. Install dependencies:
    bun install
    
  3. Run tests:
    bun test
    

Project Structure

This is a monorepo managed with Bun workspaces:

  • packages/core - Core React reconciler
  • packages/mtcute-adapter - MTCute Telegram adapter
  • packages/examples - Example implementations

Making Changes

1. Create a Feature Branch

git checkout -b feature/your-feature-name

2. Make Your Changes

  • Write clear, concise commit messages
  • Add tests for new functionality
  • Update documentation as needed
  • Ensure all tests pass

3. Create a Changeset

Before submitting a PR, create a changeset describing your changes:

bun run changeset

This will prompt you to:

  • Select which packages changed
  • Choose the type of change (major/minor/patch)
  • Write a summary of changes

4. Submit a Pull Request

  • Push your branch to your fork
  • Open a PR against the main branch
  • Fill out the PR template
  • Wait for CI checks to pass

Code Style

We use Prettier for code formatting:

bun run format

Testing

Running Tests

# Run all tests
bun test

# Run tests in watch mode
bun test:watch

# Run tests for a specific package
cd packages/core && bun test

Writing Tests

  • Place test files next to the code they test
  • Use .test.ts or .test.tsx extension
  • Follow existing test patterns

Type Checking

Ensure your code passes TypeScript checks:

bun run type-check

CI/CD Pipeline

Our GitHub Actions workflows run:

  • Tests on multiple Node versions
  • Type checking
  • Build verification
  • Security audits

Release Process

Releases are automated through GitHub Actions:

  1. Merge changesets to main
  2. Automated PR is created for version bumps
  3. Merge the version PR
  4. Packages are automatically published to npm

Questions?

Feel free to:

  • Open an issue for bugs or feature requests
  • Start a discussion for questions
  • Join our community chat (if available)

License

By contributing, you agree that your contributions will be licensed under the project's MIT License.