Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
akuzm committed Feb 3, 2025
1 parent c5b10bd commit 211f613
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/backport.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@ def report_backport_not_done(original_pr, reason, details=None):
# Set git name and email corresponding to the token user.
token_user = github.get_user()
os.environ["GIT_COMMITTER_NAME"] = token_user.name
os.environ["GIT_AUTHOR_NAME"] = token_user.name

# This is an email that is used by Github when you opt to hide your real email
# address. It is required so that the commits are recognized by Github as made
Expand All @@ -417,6 +418,8 @@ def report_backport_not_done(original_pr, reason, details=None):
os.environ["GIT_COMMITTER_EMAIL"] = (
f"{token_user.id}+{token_user.login}@users.noreply.github.com"
)
os.environ["GIT_AUTHOR_EMAIL"] = os.environ["GIT_COMMITTER_EMAIL"]

print(
f"Will commit as {os.environ['GIT_COMMITTER_NAME']} <{os.environ['GIT_COMMITTER_EMAIL']}>"
)
Expand Down

0 comments on commit 211f613

Please sign in to comment.