#4394 User the user's default email when rebasing
Merged 5 years ago by pingou. Opened 5 years ago by pingou.

file modified
+3 -2
@@ -1856,7 +1856,7 @@ 

      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 @@ 

  

      """

      _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 @@ 

          # 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

file modified
+1 -1
@@ -719,7 +719,7 @@ 

              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

We used to use a dummy email address when rebasing. With this
commit we are instead using the default email address of the user
asking for the rebase.

Fixes https://pagure.io/pagure/issue/4379

Signed-off-by: Pierre-Yves Chibon pingou@pingoured.fr

rebased onto 011b169

5 years ago

Pull-Request has been merged by pingou

5 years ago