git_cliff_core/contributor.rs
1use std::hash::{Hash, Hasher};
2
3use serde::{Deserialize, Serialize};
4
5/// Representation of a remote contributor.
6#[derive(Debug, Default, Clone, Eq, PartialEq, Deserialize, Serialize)]
7pub struct RemoteContributor {
8 /// Username.
9 pub username: Option<String>,
10 /// Title of the pull request.
11 pub pr_title: Option<String>,
12 /// The pull request that the user created.
13 pub pr_number: Option<i64>,
14 /// Labels of the pull request.
15 pub pr_labels: Vec<String>,
16 /// Whether if the user contributed for the first time.
17 pub is_first_time: bool,
18}
19
20impl Hash for RemoteContributor {
21 fn hash<H: Hasher>(&self, state: &mut H) {
22 self.username.hash(state);
23 }
24}