|
| 1 | +# Contributing to opencode2api |
| 2 | + |
| 3 | +Thank you for your interest in contributing to opencode2api! |
| 4 | + |
| 5 | +## Code of Conduct |
| 6 | + |
| 7 | +Please be respectful and professional. We follow the [Contributor Covenant](https://www.contributor-covenant.org/). |
| 8 | + |
| 9 | +## How to Contribute |
| 10 | + |
| 11 | +### Reporting Bugs |
| 12 | + |
| 13 | +1. Check if the issue already exists |
| 14 | +2. Create a detailed issue with: |
| 15 | + - Clear title and description |
| 16 | + - Steps to reproduce |
| 17 | + - Environment details |
| 18 | + - Relevant logs |
| 19 | + |
| 20 | +### Suggesting Features |
| 21 | + |
| 22 | +1. Open an issue with `[Feature Request]` prefix |
| 23 | +2. Describe the use case |
| 24 | +3. Propose a solution or API design |
| 25 | + |
| 26 | +### Pull Requests |
| 27 | + |
| 28 | +1. Fork the repository |
| 29 | +2. Create a feature branch: `git checkout -b feature/your-feature` |
| 30 | +3. Make your changes |
| 31 | +4. Run tests: `npm test` |
| 32 | +5. Commit with clear messages (see Commit Style below) |
| 33 | +6. Push to your fork |
| 34 | +7. Submit a Pull Request |
| 35 | + |
| 36 | +## Commit Style |
| 37 | + |
| 38 | +We follow [Conventional Commits](https://www.conventionalcommits.org/): |
| 39 | + |
| 40 | +``` |
| 41 | +<type>(<scope>): <description> |
| 42 | +
|
| 43 | +[optional body] |
| 44 | +
|
| 45 | +[optional footer] |
| 46 | +``` |
| 47 | + |
| 48 | +Types: |
| 49 | +- `feat`: New feature |
| 50 | +- `fix`: Bug fix |
| 51 | +- `docs`: Documentation |
| 52 | +- `style`: Code style (formatting) |
| 53 | +- `refactor`: Code refactoring |
| 54 | +- `test`: Tests |
| 55 | +- `chore`: Build/ci updates |
| 56 | + |
| 57 | +Examples: |
| 58 | +``` |
| 59 | +feat(api): add streaming support for Responses API |
| 60 | +fix(proxy): resolve memory leak in long-running sessions |
| 61 | +docs: update configuration documentation |
| 62 | +``` |
| 63 | + |
| 64 | +## Development Setup |
| 65 | + |
| 66 | +```bash |
| 67 | +# Clone and install |
| 68 | +git clone https://github.com/TiaraBasori/opencode2api.git |
| 69 | +cd opencode2api |
| 70 | +npm install |
| 71 | + |
| 72 | +# Run tests |
| 73 | +npm test |
| 74 | + |
| 75 | +# Start locally |
| 76 | +npm start |
| 77 | +``` |
| 78 | + |
| 79 | +## Testing |
| 80 | + |
| 81 | +- Unit tests: `npm run test:unit` |
| 82 | +- Integration tests: `npm run test:integration` |
| 83 | +- All tests: `npm test -- --runInBand` |
| 84 | + |
| 85 | +## Code Review Process |
| 86 | + |
| 87 | +1. All submissions require review |
| 88 | +2. Address feedback promptly |
| 89 | +3. Squash commits before merge |
| 90 | + |
| 91 | +## License |
| 92 | + |
| 93 | +By contributing, you agree that your contributions will be licensed under the [MIT License](./LICENSE.md). |
0 commit comments