git_cliff_core/
contributor.rs

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