Skip to main content

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 BountyRecord schema
  • 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 issues webhooks 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

solfoundry_bounty_sync-0.1.0.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

solfoundry_bounty_sync-0.1.0-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

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

Hashes for solfoundry_bounty_sync-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0d2dd85345d94fab747dad133f6f0d89179ad69a338c9b2f08ec981806c55cd5
MD5 827801f774cdb4d1711e6ab428d02f2d
BLAKE2b-256 c2c909aec51e37f080eb541ae2acb786cd9b1f82a4501d1fd7e582ba85489159

See more details on using hashes here.

File details

Details for the file solfoundry_bounty_sync-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for solfoundry_bounty_sync-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6b19e5e0a00ce49cd985fa640937e0ff1314a782fbd4da09ea98b5b54c056d93
MD5 f8bc9d81331eaf4bab6b48a29dc34816
BLAKE2b-256 5f29705dbe6461dfdc6783bac92a0c8a0f9341744cf933a53315ddcf5422c504

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page