diff --git a/rfd-api-spec.json b/rfd-api-spec.json index 16eb427..03fc11c 100644 --- a/rfd-api-spec.json +++ b/rfd-api-spec.json @@ -2287,12 +2287,17 @@ } }, "head_commit": { - "$ref": "#/components/schemas/GitHubCommit" + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/GitHubCommit" + } + ] }, "installation": { "$ref": "#/components/schemas/GitHubInstallation" }, - "ref_": { + "ref": { "type": "string" }, "repository": { @@ -2304,9 +2309,8 @@ }, "required": [ "commits", - "head_commit", "installation", - "ref_", + "ref", "repository", "sender" ] diff --git a/rfd-api/src/main.rs b/rfd-api/src/main.rs index 07e38f6..95b27d4 100644 --- a/rfd-api/src/main.rs +++ b/rfd-api/src/main.rs @@ -64,6 +64,8 @@ async fn main() -> Result<(), Box> { ServerLogFormat::Pretty => subscriber.pretty().init(), }; + tracing::info!("Initialized logger"); + let mut context = ApiContext::new( config.public_url, Arc::new( @@ -79,9 +81,13 @@ async fn main() -> Result<(), Box> { ) .await?; + tracing::info!("Configured server context"); + let init_data = InitialData::new(config.initial_mappers.map(|p| vec![p]))?; init_data.initialize(&context).await?; + tracing::info!("Loaded initial data"); + if let Some(github) = config.authn.oauth.github { context.insert_oauth_provider( OAuthProviderName::GitHub, @@ -93,7 +99,9 @@ async fn main() -> Result<(), Box> { github.web.client_secret.clone(), )) }), - ) + ); + + tracing::info!("Added GitHub OAuth provider"); } if let Some(google) = config.authn.oauth.google { @@ -107,7 +115,9 @@ async fn main() -> Result<(), Box> { google.web.client_secret.clone(), )) }), - ) + ); + + tracing::info!("Added Google OAuth provider"); } tracing::debug!(?config.spec, "Spec configuration");