| 391 | |
| 392 | #[async_trait] |
| 393 | pub trait SourceControlIntegration { |
| 394 | /// Gets a specific job by ID |
| 395 | async fn get_job_by_id( |
| 396 | conn: &mut diesel_async::AsyncPgConnection, |
| 397 | id: uuid::Uuid, |
| 398 | ) -> Result<Self> |
| 399 | where |
| 400 | Self: Sized; |
| 401 | |
| 402 | /// Updates job status in the source control system |
| 403 | async fn update_status( |
| 404 | app_state: AppState, |
| 405 | status: protocol::JobStatus, |
| 406 | id: uuid::Uuid, |
| 407 | ) -> Result<()>; |
| 408 | |
| 409 | /// Creates a job for the CI/CD system |
| 410 | async fn create_job( |
| 411 | commit_id: uuid::Uuid, |
| 412 | rev: &str, |
| 413 | repo_id: i64, |
| 414 | app_state: AppState, |
| 415 | vm_config: devenv_runner::protocol::VM, |
| 416 | ) -> Result<Self> |
| 417 | where |
| 418 | Self: Sized; |
| 419 | } |
| 420 | |
| 421 | impl JobGitHub { |
| 422 | async fn get_repo_and_owner( |
nothing calls this directly
no outgoing calls
no test coverage detected