todo stress level

This commit is contained in:
JMARyA 2025-01-26 16:02:50 +01:00
parent 4b151dd10d
commit 7afab287bd
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
3 changed files with 20 additions and 2 deletions

View file

@ -83,7 +83,7 @@ Welcome to `g`, the ultimate Git wrapper for the hustlers. Inspired by the TOP G
Commit changes. Commit changes.
- `-all` adds all changed files to Git. - `--all` adds all changed files to Git.
- `--done` refuses to commit with open TODOs. - `--done` refuses to commit with open TODOs.

View file

@ -36,6 +36,7 @@ pub fn create_new_branch(branch: &str) {
/// Push the current repository to remote /// Push the current repository to remote
pub fn push(force: bool) { pub fn push(force: bool) {
// TODO : Refuse push if WIP commit present
let mut cmd = Exec::cmd("git") let mut cmd = Exec::cmd("git")
.arg("push") .arg("push")
.arg("--set-upstream") .arg("--set-upstream")

View file

@ -76,7 +76,24 @@ pub fn show_todos() {
if amount == 0 { if amount == 0 {
println!("{}", "✨ No TODOs 🍃".paint(Color::Green).bold()); println!("{}", "✨ No TODOs 🍃".paint(Color::Green).bold());
} else { } else {
println!("{} TODOs found.", amount); let emoji = match amount {
1..=5 => "🌱",
6..=9 => "🙂",
10..=19 => "😅",
20..=49 => "🔥",
50..100 => "🤯",
100.. => "💀",
_ => "💀",
};
println!(
"{emoji} {} TODOs found.",
if amount < 20 {
amount.paint(Color::Yellow).bold()
} else {
amount.paint(Color::Red).bold()
}
);
show_rg(TODO_REGEX); show_rg(TODO_REGEX);
} }
} }