simple-commit 1.0.2

A little CLI written in rust to improve your dirty commits into conventional ones.
// Not manual modify
// This code is autogenerated by pipeline on GitHub Actions
// Version of emoji based: v3.14.0
// This generation is based from https://raw.githubusercontent.com/carloscuesta/gitmoji/v3.14.0/packages/gitmojis/src/gitmojis.json
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.",
    ),
];