diff --git a/.zed/settings.json b/.zed/settings.json index afccddd..c873cae 100644 --- a/.zed/settings.json +++ b/.zed/settings.json @@ -9,7 +9,12 @@ "rust-analyzer": { "initialization_options": { "check": { - "command": "clippy" + "command": "clippy", + "extraArgs": [ + "--", + "-D", + "warnings" + ] } } } diff --git a/crates/herald-server/src/bot.rs b/crates/herald-server/src/bot.rs index 12ba2d7..0a4482c 100644 --- a/crates/herald-server/src/bot.rs +++ b/crates/herald-server/src/bot.rs @@ -20,7 +20,6 @@ pub struct ReviewResult { pub struct ReviewItem { pub filename: String, pub line: Option, - pub code: String, pub message: String, } diff --git a/crates/herald-server/src/gitea.rs b/crates/herald-server/src/gitea.rs index 8477b4b..b6b48fb 100644 --- a/crates/herald-server/src/gitea.rs +++ b/crates/herald-server/src/gitea.rs @@ -197,7 +197,6 @@ pub struct ReviewPayload { #[derive(Deserialize, Debug)] pub struct PullRequest { - pub id: u64, pub diff_url: String, pub number: u64, pub title: String, @@ -207,12 +206,10 @@ pub struct PullRequest { pub struct Comment { pub id: u64, pub body: String, - pub user: User, } #[derive(Deserialize, Debug)] pub struct User { - pub id: u64, pub login: String, } @@ -282,10 +279,8 @@ mod tests { match result.unwrap() { WebhookType::Review(payload) => { assert_eq!(payload.action, "created"); - assert_eq!(payload.pull_request.id, 42); assert_eq!(payload.comment.id, 7); assert_eq!(payload.comment.body, "@test_bot LGTM"); - assert_eq!(payload.comment.user.id, 100); } } } @@ -375,10 +370,8 @@ mod tests { let payload: ReviewPayload = serde_json::from_value(json).unwrap(); assert_eq!(payload.action, "created"); - assert_eq!(payload.pull_request.id, 99); assert_eq!(payload.comment.id, 12); assert_eq!(payload.comment.body, "Needs work"); - assert_eq!(payload.comment.user.id, 200); } #[test]