Fix deserialization of PullRequest with empty body in changelog tool
This commit is contained in:
parent
e36e042093
commit
ce5834979c
2 changed files with 9 additions and 4 deletions
|
|
@ -306,7 +306,7 @@ impl Contribution {
|
||||||
pub struct PullRequest {
|
pub struct PullRequest {
|
||||||
pub id: u64,
|
pub id: u64,
|
||||||
pub title: String,
|
pub title: String,
|
||||||
pub description: String,
|
pub description: Option<String>,
|
||||||
pub labels: Vec<String>,
|
pub labels: Vec<String>,
|
||||||
pub author: String,
|
pub author: String,
|
||||||
}
|
}
|
||||||
|
|
@ -334,7 +334,7 @@ impl PullRequest {
|
||||||
#[derive(Deserialize)]
|
#[derive(Deserialize)]
|
||||||
struct Schema {
|
struct Schema {
|
||||||
title: String,
|
title: String,
|
||||||
body: String,
|
body: Option<String>,
|
||||||
user: User,
|
user: User,
|
||||||
labels: Vec<Label>,
|
labels: Vec<Label>,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -90,8 +90,13 @@ impl Generator {
|
||||||
return Task::none();
|
return Task::none();
|
||||||
};
|
};
|
||||||
|
|
||||||
let description =
|
let description = markdown::parse(
|
||||||
markdown::parse(&pull_request.description).collect();
|
pull_request
|
||||||
|
.description
|
||||||
|
.as_deref()
|
||||||
|
.unwrap_or("*No description provided*"),
|
||||||
|
)
|
||||||
|
.collect();
|
||||||
|
|
||||||
*state = State::Loaded {
|
*state = State::Loaded {
|
||||||
title: pull_request.title.clone(),
|
title: pull_request.title.clone(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue