callback.py
· 333 B · Python
Brut
old_email = b"[email protected]"
new_email = b"[email protected]"
new_name = "newname"
if commit.author_email == old_email:
commit.author_name = new_name.encode("utf-8")
commit.author_email = new_email
if commit.committer_email == old_email:
commit.committer_name = new_name.encode("utf-8")
commit.committer_email = new_email
| 1 | old_email = b"[email protected]" |
| 2 | new_email = b"[email protected]" |
| 3 | new_name = "newname" |
| 4 | |
| 5 | if commit.author_email == old_email: |
| 6 | commit.author_name = new_name.encode("utf-8") |
| 7 | commit.author_email = new_email |
| 8 | if commit.committer_email == old_email: |
| 9 | commit.committer_name = new_name.encode("utf-8") |
| 10 | commit.committer_email = new_email |
| 11 |