diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2026-01-07 12:24:42 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2026-01-07 12:24:42 +0000 |
| commit | e72edbae86affcb9fc0429bd197639bf438ffb6c (patch) | |
| tree | b59f31287d10fe9b22d7e5af4cb3aa94ef06dc8a /src/purgatory/sync/loop.rs | |
| parent | 18bfb246029a848a0b307e7c8a8e4df57addabb2 (diff) | |
Add unified process_newly_available_git_data function
Implement the unified function that handles all post-git-data-available
processing, regardless of how data arrived (git push or purgatory sync).
This function:
- Discovers satisfiable events from purgatory (state and PR events)
- Syncs OIDs to authorized owner repos
- Aligns refs and sets HEAD
- Saves events to database
- Notifies WebSocket subscribers
- Removes from purgatory
New additions:
- ProcessResult struct for tracking processing outcomes
- process_newly_available_git_data async function in src/git/sync.rs
- Helper functions: extract_identifier_from_repo_path, extract_identifier_from_pr_event
- Purgatory::find_prs_for_identifier method for PR event discovery
- Unit tests for all helper functions
Also fixes:
- Simplified extract_domain to avoid url crate dependency
- Removed unused imports in sync/loop.rs
Diffstat (limited to 'src/purgatory/sync/loop.rs')
| -rw-r--r-- | src/purgatory/sync/loop.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/purgatory/sync/loop.rs b/src/purgatory/sync/loop.rs index aaf1300..ebca766 100644 --- a/src/purgatory/sync/loop.rs +++ b/src/purgatory/sync/loop.rs | |||
| @@ -12,7 +12,7 @@ | |||
| 12 | use std::sync::Arc; | 12 | use std::sync::Arc; |
| 13 | use std::time::Duration; | 13 | use std::time::Duration; |
| 14 | use tokio::task::JoinHandle; | 14 | use tokio::task::JoinHandle; |
| 15 | use tracing::{debug, info, warn}; | 15 | use tracing::{debug, info}; |
| 16 | 16 | ||
| 17 | use crate::purgatory::Purgatory; | 17 | use crate::purgatory::Purgatory; |
| 18 | 18 | ||