3.3 KiB
3.3 KiB
Contributing to GitHub Sponsors Webhook Bot
Thank you for considering contributing to the GitHub Sponsors Webhook Bot! This document provides guidelines and instructions for contributing to this project.
Code of Conduct
By participating in this project, you agree to abide by our Code of Conduct. Please be respectful and considerate of others when contributing.
How to Contribute
There are many ways to contribute to this project:
- Reporting Bugs: If you find a bug, please create an issue with a detailed description of the problem, steps to reproduce, and your environment.
- Suggesting Enhancements: Have an idea for a new feature or improvement? Create an issue with the tag "enhancement" and describe your suggestion.
- Code Contributions: Want to fix a bug or implement a feature? Follow the steps below.
Development Process
- Fork the Repository: Create your own fork of the repository.
- Create a Branch: Create a branch for your changes.
git checkout -b feature/your-feature-name - Make Changes: Implement your changes, following the coding standards below.
- Write Tests: Add tests for your changes to ensure they work as expected.
- Run Tests: Make sure all tests pass.
pytest - Commit Changes: Commit your changes with a clear and descriptive commit message.
git commit -m "Add feature: your feature description" - Push Changes: Push your changes to your fork.
git push origin feature/your-feature-name - Create a Pull Request: Submit a pull request from your fork to the main repository.
Coding Standards
- Follow PEP 8 style guidelines for Python code.
- Write clear, descriptive comments and docstrings.
- Keep functions and methods focused on a single responsibility.
- Add type hints where appropriate.
- Maintain test coverage for new code.
Pull Request Guidelines
- Provide a clear description of the changes in your pull request.
- Link to any related issues.
- Include screenshots or examples if applicable.
- Make sure all tests pass.
- Keep pull requests focused on a single change or feature.
Setting Up Development Environment
-
Clone the repository:
git clone https://github.com/overspend1/github-sponsors-webhook-bot.git cd github-sponsors-webhook-bot -
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate -
Install dependencies:
pip install -r requirements.txt pip install -r requirements-dev.txt # Development dependencies -
Create a
.envfile with your development credentials:cp .env.example .env # Edit .env with your credentials -
Run the bot locally:
python github_sponsors_bot.py
Testing
- Write unit tests for new functionality.
- Run tests with pytest:
pytest - For webhook testing, use the provided
test_webhook.pyscript.
Documentation
- Update documentation for any changes to functionality.
- Document new features, configuration options, or behavior changes.
- Keep the README up to date.
Questions?
If you have any questions about contributing, please create an issue with the tag "question".
Thank you for your contributions!