diff --git a/pagure/lib/git.py b/pagure/lib/git.py index 166747c..31253c1 100644 --- a/pagure/lib/git.py +++ b/pagure/lib/git.py @@ -1856,7 +1856,7 @@ def merge_pull_request(session, request, username, domerge=True): return "Changes merged!" -def rebase_pull_request(request, username): +def rebase_pull_request(session, request, username): """ Rebase the specified pull-request. Args: @@ -1871,6 +1871,7 @@ def rebase_pull_request(request, username): """ _log.info("%s asked to rebase the pull-request: %s", username, request) + user = pagure.lib.query.get_user(session, username) if request.remote: # Get the fork @@ -1941,7 +1942,7 @@ def rebase_pull_request(request, username): # Configure git for that user command = ["git", "config", "user.name", username] _run_command(command) - command = ["git", "config", "user.email", "%s@pagure" % username] + command = ["git", "config", "user.email", user.default_email] _run_command(command) # Do the rebase diff --git a/pagure/lib/tasks.py b/pagure/lib/tasks.py index 193dcf3..05bbe39 100644 --- a/pagure/lib/tasks.py +++ b/pagure/lib/tasks.py @@ -719,7 +719,7 @@ def rebase_pull_request( request.id, request.uid, ) - pagure.lib.git.rebase_pull_request(request, user_rebaser) + pagure.lib.git.rebase_pull_request(session, request, user_rebaser) update_pull_request(request.uid, username=user_rebaser) # Schedule refresh of all opened PRs