'Merged' note

This commit is contained in:
Timothy Andrew 2020-06-08 22:00:37 +05:30
parent 85322ca9c1
commit dbb856a7d9
No known key found for this signature in database
GPG Key ID: ABD64509E977B249
2 changed files with 8 additions and 1 deletions

View File

@ -68,6 +68,13 @@ impl PullRequest {
pub fn body(&self) -> &str {
&self.body
}
pub fn note(&self) -> &str {
match &self.state {
PullRequestStatus::Open => "N/A",
PullRequestStatus::Closed => "Merged"
}
}
}
#[derive(Deserialize, Debug)]

View File

@ -34,7 +34,7 @@ pub fn build_table(graph: Graph<Rc<PullRequest>, usize>, title: &str) -> String
node.title(),
graph[parent.source()].number()
),
None => format!("|#{}|{}|**N/A**|\n", node.number(), node.title()),
None => format!("|#{}|{}|**{}**|\n", node.number(), node.title(), node.note()),
};
out.push_str(&process(row));