todo stress level
This commit is contained in:
parent
4b151dd10d
commit
7afab287bd
3 changed files with 20 additions and 2 deletions
|
@ -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.
|
||||||
|
|
||||||
|
|
|
@ -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")
|
||||||
|
|
19
src/main.rs
19
src/main.rs
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue