From 5b6471bef2276cc4caa722ce631ba11e4a499be1 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Nov 23 2018 09:43:22 +0000 Subject: Adjust the update_pull_request task so it refreshes all the information Before it was just calling a diff on the PR which led to the refresh of the commit_start and commit_stop but now we're going the entire way meaning we're also refreshing the cached merge_status. Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/lib/tasks.py b/pagure/lib/tasks.py index 48c51c3..b26f284 100644 --- a/pagure/lib/tasks.py +++ b/pagure/lib/tasks.py @@ -878,26 +878,12 @@ def update_pull_request(self, session, pr_uid): request.project.fullname, request.id, ) - if request.remote: - repopath = pagure.utils.get_remote_repo_path( - request.remote_git, request.branch_from - ) - parentpath = pagure.utils.get_repo_path(request.project) - else: - repo_from = request.project_from - parentpath = pagure.utils.get_repo_path(request.project) - repopath = parentpath - if repo_from: - repopath = pagure.utils.get_repo_path(repo_from) - _log.debug( - " working on the repo in: %s and %s", repopath, parentpath - ) - - repo_obj = pygit2.Repository(repopath) - orig_repo = pygit2.Repository(parentpath) - pagure.lib.git.diff_pull_request( - session, request, repo_obj, orig_repo, with_diff=False + merge_status = pagure.lib.git.merge_pull_request( + session=session, + request=request, + username=None, + domerge=False, )