Thank you for your interest in contributing to Hey 403! This CLI tool helps diagnose domain accessibility issues, and we welcome contributions to make it even better. Whether you're fixing bugs, adding features, improving docs, or writing tests, your help is appreciated.
This guide outlines how to contribute effectively. Please read it carefully to ensure a smooth collaboration process.
To contribute, you'll need:
- Python 3.8+: Ensure Python is installed (download here).
- Git: For version control (install Git).
- pip: Python package manager (comes with Python).
- A GitHub account to submit Pull Requests.
-
Fork the Repository:
- Go to github.com/Diramid/hey-403-cli and click "Fork".
- Clone your fork:
git clone https://github.com/YOUR-USERNAME/hey-403-cli.git cd hey-403-cli
-
Install Dependencies:
- Install the project in editable mode with development dependencies:
pip install -e .[dev]
- This installs
rich,requests,dnspython,pytest, and other dev tools.
- Install the project in editable mode with development dependencies:
-
Verify Setup:
- Run the existing tests to ensure everything works:
pytest tests/ -v
- Run the existing tests to ensure everything works:
- Check the ROADMAP for planned features and tasks.
- Browse open issues labeled
good first issueorhelp wanted. - Propose a new feature or bug fix by opening an issue to discuss it first.
-
Create a Branch:
- Use a descriptive branch name, e.g.,
feature/add-json-outputorfix/dns-timeout:git checkout -b feature/your-feature-name
- Use a descriptive branch name, e.g.,
-
Write Your Code:
- Follow the Code Style Guidelines below.
- Add or update tests in the
tests/directory for your changes. - Update documentation (e.g.,
README.mdor docstrings) if needed.
-
Test Your Changes:
- Run the test suite:
pytest tests/ -v
- Ensure all tests pass and aim for >80% test coverage (use
pytest-covfor coverage reports). - Manually test your changes with:
hey403 example.com
- Run the test suite:
-
Commit Your Changes:
- Write clear, concise commit messages (e.g.,
Add JSON output support for test results). - Use:
git commit -m "Your descriptive commit message"
- Write clear, concise commit messages (e.g.,
-
Push and Create a Pull Request:
- Push your branch to your fork:
git push origin feature/your-feature-name
- Open a Pull Request (PR) on the main repository.
- In the PR description, explain:
- What the change does.
- Why it’s needed (link to relevant issue if applicable).
- How you tested it.
- Push your branch to your fork:
To keep the codebase consistent:
- Python Style: Follow PEP 8 for code style. Use
flake8to check:flake8 . - Formatting: Use
blackfor automatic code formatting:black . - Docstrings: Write clear docstrings for functions and modules using Google style (see example).
- Type Hints: Use type annotations where possible (checked with
mypy). - Commit Messages: Follow Conventional Commits (e.g.,
feat: add JSON output,fix: handle DNS timeout errors). - Dependencies: Avoid adding new dependencies unless necessary. Discuss in an issue first.
- Ensure your PR addresses a specific issue or feature (link it in the description).
- Include tests and documentation updates.
- Maintainers will review your PR within 7 days. They may request changes or provide feedback.
- After approval, your changes will be merged into the main branch.
- Open an issue with the
buglabel. - Include:
- Steps to reproduce the issue.
- Expected vs. actual behavior.
- Your environment (OS, Python version,
hey403version). - Any relevant logs or screenshots.
- Open an issue with the
enhancementlabel. - Describe the feature, why it’s useful, and any implementation ideas.
- Check the ROADMAP.md to avoid duplicates.
- Join the discussion in GitHub Issues.
- For questions, create an issue with the
questionlabel. - Be respectful and follow the Code of Conduct.
By contributing, you agree that your contributions will be licensed under the MIT License.
Thank you for helping make Hey 403 better! 🚀