Production-ready GitHub issue scraper and publisher for SolFoundry bounty ingestion.
Project description
solfoundry-bounty-sync
Production-ready GitHub issue scraper + publisher for the SolFoundry bounty ingestion workflow.
Built for SolFoundry issue #840: Bounty T2: GitHub Issue Scraper for Foundry Bounties.
What it does
- polls configurable GitHub repositories for open bounty issues
- normalizes issues into a stable
BountyRecordschema - maps tiers from issue titles/labels (
T1,T2,T3) - publishes records to a SolFoundry API endpoint, or runs safely in dry-run mode
- supports GitHub
issueswebhooks with HMAC SHA-256 signature verification - stores sync state in SQLite for dedupe/idempotency
- exposes
/healthz,/sync, and/webhooks/github - ships with CLI, tests, and typed Pydantic models
Quick start
python -m venv .venv
. .venv/bin/activate
pip install -e '.[dev]'
cp .env.example .env
solfoundry-bounty-sync sync
solfoundry-bounty-sync serve --port 8080
Configuration
Environment variables use the SOLFOUNDRY_ prefix.
SOLFOUNDRY_GITHUB_TOKEN=github_pat_or_classic_token
SOLFOUNDRY_GITHUB_REPOS='["SolFoundry/solfoundry"]'
SOLFOUNDRY_GITHUB_LABELS_ANY='["bounty","T1","T2","T3"]'
SOLFOUNDRY_GITHUB_WEBHOOK_SECRET=change-me
SOLFOUNDRY_SOLFOUNDRY_API_URL=https://api.solfoundry.example
SOLFOUNDRY_SOLFOUNDRY_API_TOKEN=token
SOLFOUNDRY_DRY_RUN=true
SOLFOUNDRY_DATABASE_URL=sqlite:///./solfoundry_bounty_sync.db
Dry-run is enabled by default so the package can be verified without touching production.
Verification checklist
python -m pytest
python -m ruff check .
python -m build
Integration notes
The publisher expects POST {SOLFOUNDRY_SOLFOUNDRY_API_URL}/bounties with the normalized BountyRecord JSON. If SolFoundry's internal API route differs, only publisher.py needs a small adapter change; ingestion, mapping, dedupe, and webhook verification remain unchanged.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file solfoundry_bounty_sync-0.1.0.tar.gz.
File metadata
- Download URL: solfoundry_bounty_sync-0.1.0.tar.gz
- Upload date:
- Size: 11.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d2dd85345d94fab747dad133f6f0d89179ad69a338c9b2f08ec981806c55cd5
|
|
| MD5 |
827801f774cdb4d1711e6ab428d02f2d
|
|
| BLAKE2b-256 |
c2c909aec51e37f080eb541ae2acb786cd9b1f82a4501d1fd7e582ba85489159
|
File details
Details for the file solfoundry_bounty_sync-0.1.0-py3-none-any.whl.
File metadata
- Download URL: solfoundry_bounty_sync-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b19e5e0a00ce49cd985fa640937e0ff1314a782fbd4da09ea98b5b54c056d93
|
|
| MD5 |
f8bc9d81331eaf4bab6b48a29dc34816
|
|
| BLAKE2b-256 |
5f29705dbe6461dfdc6783bac92a0c8a0f9341744cf933a53315ddcf5422c504
|