Skip to content

Commit

Permalink
Fix git configuration before applying patch (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
yixinglu authored Nov 9, 2021
1 parent a9c824c commit 2ab22c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,15 @@ 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}>")


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")
Expand Down

0 comments on commit 2ab22c6

Please sign in to comment.