@@ -400,7 +400,7 @@ async fn handle_webhooks(
400400 _ => ( ) ,
401401 }
402402
403- if let Err ( err) = sqlx:: query (
403+ if let Err ( err) = sqlx:: query (
404404 r#"insert into issues (source_id, source, title, body, is_pull_request, number, html_url, url, repository_full_name, embedding)
405405 values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10)"#
406406 )
@@ -503,7 +503,7 @@ async fn handle_webhooks(
503503 "error inserting comment"
504504 ) ;
505505 }
506- Some ( comment. source_id )
506+ Some ( comment. issue_id )
507507 } else {
508508 error ! (
509509 comment_id = comment. source_id,
@@ -870,8 +870,7 @@ async fn handle_webhooks(
870870 info ! ( "regenerating embeddings for {} issues" , total_issues) ;
871871 for ( current_issue_nb, issue) in issues. into_iter ( ) . enumerate ( ) {
872872 if let Err ( err) =
873- update_issue_embeddings ( & embedding_api, & pool, issue. source_id )
874- . await
873+ update_issue_embedding ( & embedding_api, & pool, issue. source_id ) . await
875874 {
876875 error ! (
877876 issue_id = issue. source_id,
@@ -929,7 +928,7 @@ async fn handle_webhooks(
929928 } ;
930929
931930 if let Some ( issue_id) = issue_id {
932- if let Err ( err) = update_issue_embeddings ( & embedding_api, & pool, issue_id) . await {
931+ if let Err ( err) = update_issue_embedding ( & embedding_api, & pool, issue_id) . await {
933932 error ! (
934933 issue_id = issue_id,
935934 err = err. to_string( ) ,
@@ -940,7 +939,7 @@ async fn handle_webhooks(
940939 }
941940}
942941
943- async fn update_issue_embeddings (
942+ async fn update_issue_embedding (
944943 embedding_api : & EmbeddingApi ,
945944 pool : & Pool < Postgres > ,
946945 issue_id : i64 ,
0 commit comments