Thanks for considering a contribution! This project is small, so the process is intentionally lightweight.
- For bug reports and feature requests, open an issue.
- For questions, ideas, or general chat, use Discussions.
- For larger changes, open an issue or discussion first to align on the approach before writing code. Saves you and me time.
You'll need uv (the project uses Python 3.13, pinned in .python-version).
git clone https://github.com/NiklasTiede/Github-Trending-API.git
cd Github-Trending-API
uv sync --devRun the API locally:
make run
# or: uv run python -m uvicorn app.main:app --host 127.0.0.1 --port 1313 --reload-
Fork the repo and create a branch off
main. -
Make your change. Keep commits focused.
-
Run the checks locally before pushing:
make pre-commit # ruff, formatting, etc. make test # pytest with coverage
-
Push and open a pull request. Fill in the PR template.
-
CI runs the same checks plus a Docker build. Both must be green.
- Linting and formatting are handled by
ruffvia pre-commit. Just runmake pre-commitand you're good. - Type hints are expected for new public functions and Pydantic models.
- Follow the patterns already in
app/— adding a new endpoint should look like the existing ones.
- New endpoints, parsers, or filters need tests in
tests/. - Aim to keep coverage from dropping. Bonus points if you raise it.
- Network-dependent tests should mock the upstream HTML response — no real calls to github.com/trending in the test suite.
Loose convention based on Conventional Commits:
feat: add spoken_language_code filter to /developers
fix: handle missing avatar URLs in trending repos
docs: clarify Docker port in README
chore: bump fastapi to 0.115
This keeps the changelog readable and helps with release notes. Not strictly enforced but appreciated.
- Small, focused PRs get reviewed faster than sprawling ones.
- Update
CHANGELOG.mdunder## [Unreleased]if your change is user-visible. - If you're touching the README or API surface, update the OpenAPI/Pydantic models too.
If anything in here is unclear, just ask in the Discussions. I'd rather you ask than get stuck.