Don't crash on PRs with empty descriptions
This commit is contained in:
parent
eef30d7a68
commit
fe31284cd8
@ -53,7 +53,7 @@ pub struct PullRequest {
|
|||||||
base: PullRequestRef,
|
base: PullRequestRef,
|
||||||
title: String,
|
title: String,
|
||||||
url: String,
|
url: String,
|
||||||
body: String,
|
body: Option<String>,
|
||||||
state: PullRequestStatus,
|
state: PullRequestStatus,
|
||||||
merged_at: Option<String>,
|
merged_at: Option<String>,
|
||||||
draft: bool,
|
draft: bool,
|
||||||
@ -106,7 +106,10 @@ impl PullRequest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn body(&self) -> &str {
|
pub fn body(&self) -> &str {
|
||||||
&self.body
|
match &self.body {
|
||||||
|
Some(body) => body,
|
||||||
|
None => "",
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn fetch_reviews(
|
pub async fn fetch_reviews(
|
||||||
|
Loading…
Reference in New Issue
Block a user