Merge remote-tracking branch 'origin/master' into feat/pixel_art

This commit is contained in:
2026-08-15 11:20:43 +00:00
2 changed files with 5 additions and 6 deletions
@@ -52,9 +52,7 @@ pub struct PreviewResult {
#[serde(alias = "id")]
pub deployment_id: Option<String>,
pub project_name: Option<String>,
#[serde(alias = "sourceBranch")]
pub branch: Option<String>,
#[serde(alias = "sourceCommit")]
pub resolved_commit: Option<String>,
pub status: Option<DeploymentStatus>,
pub health: Option<HealthStatus>,
@@ -273,10 +271,11 @@ impl JenkinsClient {
if !response.status().is_success() {
return Err(format!("Jenkins 状态返回 HTTP {}", response.status()));
}
response
.json()
let bytes = response
.bytes()
.await
.map_err(|_| "Jenkins 状态响应格式无效".to_string())
.map_err(|error| format!("Jenkins 状态响应正文读取失败: {error}"))?;
serde_json::from_slice(&bytes).map_err(|error| format!("Jenkins 状态响应格式无效: {error}"))
}
async fn get_json_with_retry<T: DeserializeOwned>(&self, url: Url) -> Result<T, String> {
@@ -130,7 +130,7 @@ async fn mock_artifact(axum::extract::Path(build): axum::extract::Path<u64>) ->
"deploymentId": "preview-63d38d3da6bc9b06",
"projectName": "genarrative-preview-63d38d3da6bc9b06",
"branch": "feature/preview-ui",
"sourceCommit": "0123456789abcdef0123456789abcdef01234567",
"resolvedCommit": "0123456789abcdef0123456789abcdef01234567",
"phase": "RUNNING",
"healthStatus": "HEALTHY",
"webUrl": "http://192.168.35.82:8400",