MI
Miskler/pytest-jsonschema-snapshot-bot
pytest-jsonschema-snapshot-bot
Single-file snapshot bot that:
- switches to a persistent branch (creates if missing) while preserving working snapshot files,
- collects changes from CI snapshots (default: tests/snapshots/ci.cd) comparing with tests/snapshots
using jsonschema-diff (falls back to bytewise compare), - copies new/updated files into base snapshots folder,
- commits and force-pushes a single persistent branch,
- does NOT call GitHub REST API to create PRs; instead writes a prefilled PR "compare" URL to GITHUB_STEP_SUMMARY
(and stdout) so a human can open the PR with title+body prefilled.
Usage:
python snapshot_bot_single.py
--ci-path tests/snapshots/ci.cd
--base-path tests/snapshots
Environment:
GITHUB_REPOSITORY should be set (owner/repo) for PR link generation (set automatically in GitHub Actions).
If push requires authentication and you want to push via token, set GITHUB_TOKEN in env. If not present,
bot will attempt to push to 'origin' (requires actions/checkout with credentials).
On this page
Languages
Python100.0%
Contributors
GNU General Public License v3.0
Created March 8, 2026
Updated March 8, 2026