diff --git a/src/api/pull_request.rs b/src/api/pull_request.rs index 7d05f48..95adfbc 100644 --- a/src/api/pull_request.rs +++ b/src/api/pull_request.rs @@ -53,7 +53,7 @@ pub struct PullRequest { base: PullRequestRef, title: String, url: String, - body: String, + body: Option, state: PullRequestStatus, merged_at: Option, draft: bool, @@ -106,7 +106,10 @@ impl PullRequest { } pub fn body(&self) -> &str { - &self.body + match &self.body { + Some(body) => body, + None => "", + } } pub async fn fetch_reviews(