Show More
@@ -907,15 +907,20 b' class PullRequestModel(BaseModel):' | |||
|
907 | 907 | """ |
|
908 | 908 | Try to merge the pull request and return the merge status. |
|
909 | 909 | """ |
|
910 | log.debug( | |
|
911 | "Trying out if the pull request %s can be merged.", | |
|
912 | pull_request.pull_request_id) | |
|
910 | 913 | target_vcs = pull_request.target_repo.scm_instance() |
|
911 | 914 | target_ref = self._refresh_reference( |
|
912 | 915 | pull_request.target_ref_parts, target_vcs) |
|
913 | 916 | |
|
914 | 917 | target_locked = pull_request.target_repo.locked |
|
915 | 918 | if target_locked and target_locked[0]: |
|
919 | log.debug("The target repository is locked.") | |
|
916 | 920 | merge_state = MergeResponse( |
|
917 | 921 | False, False, None, MergeFailureReason.TARGET_IS_LOCKED) |
|
918 | 922 | elif self._needs_merge_state_refresh(pull_request, target_ref): |
|
923 | log.debug("Refreshing the merge status of the repository.") | |
|
919 | 924 | merge_state = self._refresh_merge_state( |
|
920 | 925 | pull_request, target_vcs, target_ref) |
|
921 | 926 | else: |
@@ -923,6 +928,7 b' class PullRequestModel(BaseModel):' | |||
|
923 | 928 | _last_merge_status == MergeFailureReason.NONE |
|
924 | 929 | merge_state = MergeResponse( |
|
925 | 930 | possible, False, None, pull_request._last_merge_status) |
|
931 | log.debug("Merge response: %s", merge_state) | |
|
926 | 932 | return merge_state |
|
927 | 933 | |
|
928 | 934 | def _refresh_reference(self, reference, vcs_repository): |
General Comments 0
You need to be logged in to leave comments.
Login now