continue tracing impl
This commit is contained in:
@@ -1,15 +1,16 @@
|
||||
use futures_util::stream::TryStreamExt;
|
||||
use tokio::io::AsyncReadExt;
|
||||
use tokio_util::io::StreamReader;
|
||||
use tracing::instrument;
|
||||
|
||||
use crate::{
|
||||
bot::ReviewResult,
|
||||
consts::{BOT_PROCESS_MSG, MAX_DIFF_SIZE, REVIEW_PROMPT},
|
||||
errors::AppError,
|
||||
gitea::{GiteaAPI, ReviewPayload},
|
||||
open_router::OpenRouterClient,
|
||||
};
|
||||
|
||||
#[instrument(skip(gitea_api, open_router_client, http_client, review_payload), err)]
|
||||
pub async fn exec_review(
|
||||
gitea_api: &GiteaAPI,
|
||||
open_router_client: &OpenRouterClient,
|
||||
@@ -17,6 +18,13 @@ pub async fn exec_review(
|
||||
model: &str,
|
||||
review_payload: ReviewPayload,
|
||||
) -> anyhow::Result<()> {
|
||||
tracing::info!(
|
||||
repo = %review_payload.repository.full_name,
|
||||
pr = review_payload.pull_request.number,
|
||||
action = %review_payload.action,
|
||||
"Starting review"
|
||||
);
|
||||
|
||||
let new_comment = gitea_api
|
||||
.comment(
|
||||
&BOT_PROCESS_MSG.replace("{model}", model),
|
||||
|
||||
Reference in New Issue
Block a user