Compare commits
2 commits
6a1e438c94
...
c9dbec730c
| Author | SHA1 | Date | |
|---|---|---|---|
| c9dbec730c | |||
| 0d9a893087 |
1 changed files with 33 additions and 28 deletions
|
|
@ -285,35 +285,40 @@ fn handle_command(
|
|||
|
||||
Commands::Show { issue_id } => {
|
||||
let issues = entomologist::database::read_issues_database(issues_database_source)?;
|
||||
match issues.get_issue(issue_id) {
|
||||
Some(issue) => {
|
||||
println!("issue {}", issue_id);
|
||||
println!("author: {}", issue.author);
|
||||
println!("creation_time: {}", issue.creation_time);
|
||||
if let Some(done_time) = &issue.done_time {
|
||||
println!("done_time: {}", done_time);
|
||||
}
|
||||
println!("state: {:?}", issue.state);
|
||||
if let Some(dependencies) = &issue.dependencies {
|
||||
println!("dependencies: {:?}", dependencies);
|
||||
}
|
||||
if let Some(assignee) = &issue.assignee {
|
||||
println!("assignee: {}", assignee);
|
||||
}
|
||||
println!("");
|
||||
println!("{}", issue.description);
|
||||
for comment in &issue.comments {
|
||||
println!("");
|
||||
println!("comment: {}", comment.uuid);
|
||||
println!("author: {}", comment.author);
|
||||
println!("creation_time: {}", comment.creation_time);
|
||||
println!("");
|
||||
println!("{}", comment.description);
|
||||
}
|
||||
}
|
||||
None => {
|
||||
return Err(anyhow::anyhow!("issue {} not found", issue_id));
|
||||
let Some(issue) = issues.get_issue(issue_id) else {
|
||||
return Err(anyhow::anyhow!("issue {} not found", issue_id));
|
||||
};
|
||||
println!("issue {}", issue_id);
|
||||
println!("author: {}", issue.author);
|
||||
if issue.tags.len() > 0 {
|
||||
print!("tags: ");
|
||||
let mut separator = "";
|
||||
for tag in &issue.tags {
|
||||
print!("{}{}", separator, tag);
|
||||
separator = ", ";
|
||||
}
|
||||
println!("");
|
||||
}
|
||||
println!("creation_time: {}", issue.creation_time);
|
||||
if let Some(done_time) = &issue.done_time {
|
||||
println!("done_time: {}", done_time);
|
||||
}
|
||||
println!("state: {:?}", issue.state);
|
||||
if let Some(dependencies) = &issue.dependencies {
|
||||
println!("dependencies: {:?}", dependencies);
|
||||
}
|
||||
if let Some(assignee) = &issue.assignee {
|
||||
println!("assignee: {}", assignee);
|
||||
}
|
||||
println!("");
|
||||
println!("{}", issue.description);
|
||||
for comment in &issue.comments {
|
||||
println!("");
|
||||
println!("comment: {}", comment.uuid);
|
||||
println!("author: {}", comment.author);
|
||||
println!("creation_time: {}", comment.creation_time);
|
||||
println!("");
|
||||
println!("{}", comment.description);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue