upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/docs/tutorials
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2026-01-07 23:31:38 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2026-01-07 23:31:38 +0000
commitc67ebe6f33bfa191f17eb0df24d3ee18092c74e1 (patch)
treeb86911bbb406f4aa0253b1cf1e0a82aed16c972b /docs/tutorials
parent4dc0ed66a0bd3b4b00804bb13adf93b207bb5fc4 (diff)
refactor: unify event processing logic
Eliminates code duplication by extracting core event processing into reusable functions. All state and PR event processing now uses the same unified logic from src/git/process.rs. Changes: - Add src/git/process.rs with unified processing functions - process_state_with_git_data() for state events - process_pr_with_git_data() for PR events - Pure functions with comprehensive result types - Refactor policy handlers to use unified processing - src/nostr/policy/state.rs: Remove ~70 lines of duplicated logic - src/nostr/policy/pr_event.rs: Remove ~40 lines of duplicated logic - Refactor purgatory processing to use unified functions - src/git/sync.rs: Remove ~125 lines of duplicated logic - Make extract_owner_from_repo_path() public for reuse Benefits: - DRY: Single source of truth for event processing - Testable: Pure functions with clear contracts - Maintainable: Changes happen in one place - Consistent: All code paths use same logic All 217 unit tests + 40 integration tests pass (257/257).
Diffstat (limited to 'docs/tutorials')
0 files changed, 0 insertions, 0 deletions