mirror of
https://github.com/lockin-bot/react-telegram.git
synced 2026-01-12 22:27:38 +08:00
- 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>
2.3 KiB
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
- Fork and clone the repository
- Install dependencies:
bun install - Run tests:
bun test
Project Structure
This is a monorepo managed with Bun workspaces:
packages/core- Core React reconcilerpackages/mtcute-adapter- MTCute Telegram adapterpackages/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
mainbranch - 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.tsor.test.tsxextension - 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:
- Merge changesets to main
- Automated PR is created for version bumps
- Merge the version PR
- 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.