use colored::*;
use serde::Deserialize;
#[derive(Deserialize, Clone)]
pub struct Emoji {
pub emoji: &'static str,
pub description: &'static str,
pub name: &'static str,
}
impl Emoji {
const fn new(emoji: &'static str, name: &'static str, description: &'static str) -> Self {
Self {
emoji,
name,
description,
}
}
}
impl std::fmt::Display for Emoji {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let name = format!("({})", self.name).bright_blue();
write!(f, "{} | {} {}", self.emoji, self.description, name)
}
}
pub const EMOJIS: [Emoji; 73] = [
Emoji::new("๐จ", "art", "Improve structure / format of the code."),
Emoji::new("โก๏ธ", "zap", "Improve performance."),
Emoji::new("๐ฅ", "fire", "Remove code or files."),
Emoji::new("๐", "bug", "Fix a bug."),
Emoji::new("๐๏ธ", "ambulance", "Critical hotfix."),
Emoji::new("โจ", "sparkles", "Introduce new features."),
Emoji::new("๐", "memo", "Add or update documentation."),
Emoji::new("๐", "rocket", "Deploy stuff."),
Emoji::new("๐", "lipstick", "Add or update the UI and style files."),
Emoji::new("๐", "tada", "Begin a project."),
Emoji::new("โ
", "white-check-mark", "Add, update, or pass tests."),
Emoji::new("๐๏ธ", "lock", "Fix security or privacy issues."),
Emoji::new("๐", "closed-lock-with-key", "Add or update secrets."),
Emoji::new("๐", "bookmark", "Release / Version tags."),
Emoji::new("๐จ", "rotating-light", "Fix compiler / linter warnings."),
Emoji::new("๐ง", "construction", "Work in progress."),
Emoji::new("๐", "green-heart", "Fix CI Build."),
Emoji::new("โฌ๏ธ", "arrow-down", "Downgrade dependencies."),
Emoji::new("โฌ๏ธ", "arrow-up", "Upgrade dependencies."),
Emoji::new("๐", "pushpin", "Pin dependencies to specific versions."),
Emoji::new(
"๐ท",
"construction-worker",
"Add or update CI build system.",
),
Emoji::new(
"๐",
"chart-with-upwards-trend",
"Add or update analytics or track code.",
),
Emoji::new("โป๏ธ", "recycle", "Refactor code."),
Emoji::new("โ", "heavy-plus-sign", "Add a dependency."),
Emoji::new("โ", "heavy-minus-sign", "Remove a dependency."),
Emoji::new("๐ง", "wrench", "Add or update configuration files."),
Emoji::new("๐จ", "hammer", "Add or update development scripts."),
Emoji::new(
"๐",
"globe-with-meridians",
"Internationalization and localization.",
),
Emoji::new("โ๏ธ", "pencil2", "Fix typos."),
Emoji::new("๐ฉ", "poop", "Write bad code that needs to be improved."),
Emoji::new("โช๏ธ", "rewind", "Revert changes."),
Emoji::new("๐", "twisted-rightwards-arrows", "Merge branches."),
Emoji::new("๐ฆ๏ธ", "package", "Add or update compiled files or packages."),
Emoji::new("๐ฝ๏ธ", "alien", "Update code due to external API changes."),
Emoji::new(
"๐",
"truck",
"Move or rename resources (e.g.: files, paths, routes).",
),
Emoji::new("๐", "page-facing-up", "Add or update license."),
Emoji::new("๐ฅ", "boom", "Introduce breaking changes."),
Emoji::new("๐ฑ", "bento", "Add or update assets."),
Emoji::new("โฟ๏ธ", "wheelchair", "Improve accessibility."),
Emoji::new("๐ก", "bulb", "Add or update comments in source code."),
Emoji::new("๐ป", "beers", "Write code drunkenly."),
Emoji::new("๐ฌ", "speech-balloon", "Add or update text and literals."),
Emoji::new("๐๏ธ", "card-file-box", "Perform database related changes."),
Emoji::new("๐", "loud-sound", "Add or update logs."),
Emoji::new("๐", "mute", "Remove logs."),
Emoji::new("๐ฅ", "busts-in-silhouette", "Add or update contributor(s)."),
Emoji::new(
"๐ธ",
"children-crossing",
"Improve user experience / usability.",
),
Emoji::new("๐๏ธ", "building-construction", "Make architectural changes."),
Emoji::new("๐ฑ", "iphone", "Work on responsive design."),
Emoji::new("๐คก", "clown-face", "Mock things."),
Emoji::new("๐ฅ", "egg", "Add or update an easter egg."),
Emoji::new("๐", "see-no-evil", "Add or update a .gitignore file."),
Emoji::new("๐ธ", "camera-flash", "Add or update snapshots."),
Emoji::new("โ๏ธ", "alembic", "Perform experiments."),
Emoji::new("๐๏ธ", "mag", "Improve SEO."),
Emoji::new("๐ท๏ธ", "label", "Add or update types."),
Emoji::new("๐ฑ", "seedling", "Add or update seed files."),
Emoji::new(
"๐ฉ",
"triangular-flag-on-post",
"Add, update, or remove feature flags.",
),
Emoji::new("๐ฅ
", "goal-net", "Catch errors."),
Emoji::new("๐ซ", "dizzy", "Add or update animations and transitions."),
Emoji::new(
"๐๏ธ",
"wastebasket",
"Deprecate code that needs to be cleaned up.",
),
Emoji::new(
"๐",
"passport-control",
"Work on code related to authorization, roles and permissions.",
),
Emoji::new(
"๐ฉน",
"adhesive-bandage",
"Simple fix for a non-critical issue.",
),
Emoji::new("๐ง", "monocle-face", "Data exploration/inspection."),
Emoji::new("โฐ๏ธ", "coffin", "Remove dead code."),
Emoji::new("๐งช", "test-tube", "Add a failing test."),
Emoji::new("๐", "necktie", "Add or update business logic."),
Emoji::new("๐ฉบ", "stethoscope", "Add or update healthcheck."),
Emoji::new("๐งฑ", "bricks", "Infrastructure related changes."),
Emoji::new("๐งโ๐ป", "technologist", "Improve developer experience."),
Emoji::new(
"๐ธ",
"money-with-wings",
"Add sponsorships or money related infrastructure.",
),
Emoji::new(
"๐งต",
"thread",
"Add or update code related to multithreading or concurrency.",
),
Emoji::new(
"๐ฆบ",
"safety-vest",
"Add or update code related to validation.",
),
];