refuse wip commit push
All checks were successful
ci/woodpecker/push/build Pipeline was successful

This commit is contained in:
JMARyA 2025-01-26 18:17:18 +01:00
parent 412b8d7691
commit 13922afe5e
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263

View file

@ -36,7 +36,11 @@ 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 if last_commit().as_str() == "WIP" {
println!("{}", "Refusing to push WIP commit".paint(Color::Red));
std::process::exit(1);
}
let mut cmd = Exec::cmd("git") let mut cmd = Exec::cmd("git")
.arg("push") .arg("push")
.arg("--set-upstream") .arg("--set-upstream")