2020-04-07 02:28:48 +02:00
|
|
|
|
use crate::common::*;
|
|
|
|
|
|
|
|
|
|
#[derive(
|
2020-04-08 07:21:59 +02:00
|
|
|
|
Deserialize,
|
|
|
|
|
Serialize,
|
|
|
|
|
Debug,
|
|
|
|
|
Clone,
|
|
|
|
|
Copy,
|
|
|
|
|
Eq,
|
|
|
|
|
PartialEq,
|
|
|
|
|
Ord,
|
|
|
|
|
PartialOrd,
|
|
|
|
|
IntoStaticStr,
|
|
|
|
|
EnumVariantNames,
|
2020-04-07 02:28:48 +02:00
|
|
|
|
)]
|
|
|
|
|
#[serde(rename_all = "kebab-case")]
|
2020-04-08 07:21:59 +02:00
|
|
|
|
#[strum(serialize_all = "kebab-case")]
|
2020-04-07 02:28:48 +02:00
|
|
|
|
pub(crate) enum Kind {
|
|
|
|
|
Added,
|
|
|
|
|
Breaking,
|
|
|
|
|
Changed,
|
2020-04-08 07:21:59 +02:00
|
|
|
|
Dependencies,
|
2020-04-07 02:28:48 +02:00
|
|
|
|
Development,
|
|
|
|
|
Distribution,
|
|
|
|
|
Documentation,
|
|
|
|
|
Fixed,
|
2020-05-26 09:09:16 +02:00
|
|
|
|
Performance,
|
2020-04-07 02:28:48 +02:00
|
|
|
|
Reform,
|
|
|
|
|
Release,
|
2020-05-12 03:56:31 +02:00
|
|
|
|
Removed,
|
2020-05-26 09:09:16 +02:00
|
|
|
|
Testing,
|
2020-04-07 02:28:48 +02:00
|
|
|
|
}
|
2020-04-08 07:21:59 +02:00
|
|
|
|
|
|
|
|
|
impl Kind {
|
2020-04-30 09:05:54 +02:00
|
|
|
|
pub(crate) fn emoji_character(self) -> &'static str {
|
|
|
|
|
match self {
|
|
|
|
|
Self::Added => "✨",
|
|
|
|
|
Self::Breaking => "💥",
|
|
|
|
|
Self::Changed => "⚡️",
|
|
|
|
|
Self::Dependencies => "⬆️",
|
|
|
|
|
Self::Development => "🔧",
|
|
|
|
|
Self::Distribution => "📦",
|
|
|
|
|
Self::Documentation => "📚",
|
|
|
|
|
Self::Fixed => "🐛",
|
2020-05-26 09:09:16 +02:00
|
|
|
|
Self::Performance => "🐎",
|
2020-04-30 09:05:54 +02:00
|
|
|
|
Self::Reform => "🎨",
|
|
|
|
|
Self::Release => "🔖",
|
2020-05-12 03:56:31 +02:00
|
|
|
|
Self::Removed => "➖",
|
2020-05-26 09:09:16 +02:00
|
|
|
|
Self::Testing => "✅",
|
2020-04-30 09:05:54 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pub(crate) fn emoji_name(self) -> &'static str {
|
2020-04-08 07:21:59 +02:00
|
|
|
|
match self {
|
|
|
|
|
Self::Added => ":sparkles:",
|
|
|
|
|
Self::Breaking => ":boom:",
|
|
|
|
|
Self::Changed => ":zap:",
|
|
|
|
|
Self::Dependencies => ":arrow_up:",
|
|
|
|
|
Self::Development => ":wrench:",
|
|
|
|
|
Self::Distribution => ":package:",
|
|
|
|
|
Self::Documentation => ":books:",
|
|
|
|
|
Self::Fixed => ":bug:",
|
2020-05-26 09:09:16 +02:00
|
|
|
|
Self::Performance => ":racehorse:",
|
2020-04-08 07:21:59 +02:00
|
|
|
|
Self::Reform => ":art:",
|
|
|
|
|
Self::Release => ":bookmark:",
|
2020-05-12 03:56:31 +02:00
|
|
|
|
Self::Removed => ":heavy_minus_sign:",
|
2020-05-26 09:09:16 +02:00
|
|
|
|
Self::Testing => ":white_check_mark:",
|
2020-04-08 07:21:59 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|