Skip to content

Commit c294644

Browse files
committedNov 22, 2024·
PR Clone fix
1 parent 15fdc9c commit c294644

File tree

1 file changed

+8
-17
lines changed

1 file changed

+8
-17
lines changed
 

‎src/utils/common.rs

+8-17
Original file line numberDiff line numberDiff line change
@@ -417,26 +417,17 @@ fn save_pr_branch_files(
417417
Ok(())
418418
}
419419

420-
fn set_git_user_config() -> Result<(), Box<dyn std::error::Error>> {
421-
let email_output = Command::new("git")
422-
.args(&["config", "--get", "user.email"])
420+
// Set global Git config for user email and name
421+
fn set_git_global_user_config() -> Result<(), Box<dyn std::error::Error>> {
422+
// Set global email
423+
Command::new("git")
424+
.args(&["config", "--global", "user.email", "helabot@groww.in"])
423425
.output()?;
424-
if !email_output.status.success() {
425-
// Set default email if not already configured
426-
Command::new("git")
427-
.args(&["config", "--local", "user.email", "temp@example.com"])
428-
.output()?;
429-
}
430426

431-
let name_output = Command::new("git")
432-
.args(&["config", "--get", "user.name"])
427+
// Set global name
428+
Command::new("git")
429+
.args(&["config", "--global", "user.name", "Hela Bot"])
433430
.output()?;
434-
if !name_output.status.success() {
435-
// Set default name if not already configured
436-
Command::new("git")
437-
.args(&["config", "--local", "user.name", "Temporary User"])
438-
.output()?;
439-
}
440431

441432
Ok(())
442433
}

0 commit comments

Comments
 (0)
Please sign in to comment.