1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
use super::get_work_product;
use super::user::User;
use serde::{Deserialize, Serialize};
#[derive(Deserialize, Serialize)]
pub struct Issue {
url: String,
repository_url: String,
comments_url: String,
html_url: String,
id: u64,
number: u64,
title: String,
user: User,
comments: u64,
body: Option<String>,
}
impl Issue {
pub fn get_number(&self) -> u64 {
self.number
}
pub fn get_work_product(&self) -> Option<String> {
get_work_product(&self.title)
}
}