From 2ab22c67201afa7a876e484e66375d23ab8df335 Mon Sep 17 00:00:00 2001 From: Yee <2520865+yixinglu@users.noreply.github.com> Date: Tue, 9 Nov 2021 17:32:17 +0800 Subject: [PATCH] Fix git configuration before applying patch (#6) --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index d92a8de..45361c8 100755 --- a/main.py +++ b/main.py @@ -91,8 +91,6 @@ def commit_changes(ci: Commit): author = ci.author() print(f">>> Commit changes by <{author.email}>") git.add(".") - git.config("--local", "user.name", author.name) - git.config("--local", "user.email", author.email) git.commit("-m", ci.title, "--author", f"{author.name} <{author.email}>") @@ -100,6 +98,8 @@ def apply_patch(branch, comm_ci): print(f">>> Apply patch file to {branch}") stopped = False patch = f"{branch}.patch" + git.config("--local", "user.name", author.name) + git.config("--local", "user.email", author.email) git.clean("-f") git.fetch("origin", "master") git.checkout("-b", branch, "origin/master")