Show More
@@ -924,7 +924,7 b' def close_pull_request(' | |||
|
924 | 924 | |
|
925 | 925 | # finally close the PR, with proper message comment |
|
926 | 926 | comment, status = PullRequestModel().close_pull_request_with_comment( |
|
927 | pull_request, apiuser, repo, message=message) | |
|
927 | pull_request, apiuser, repo, message=message, auth_user=apiuser) | |
|
928 | 928 | status_lbl = ChangesetStatus.get_status_lbl(status) |
|
929 | 929 | |
|
930 | 930 | Session().commit() |
@@ -1195,7 +1195,8 b' class RepoPullRequestsView(RepoAppView, ' | |||
|
1195 | 1195 | 'pull request %s', pull_request_id) |
|
1196 | 1196 | raise HTTPForbidden() |
|
1197 | 1197 | comment, status = PullRequestModel().close_pull_request_with_comment( |
|
1198 |
pull_request, self._rhodecode_user, self.db_repo, message=text |
|
|
1198 | pull_request, self._rhodecode_user, self.db_repo, message=text, | |
|
1199 | auth_user=self._rhodecode_user) | |
|
1199 | 1200 | Session().flush() |
|
1200 | 1201 | events.trigger( |
|
1201 | 1202 | events.PullRequestCommentEvent(pull_request, comment)) |
@@ -1174,7 +1174,7 b' class PullRequestModel(BaseModel):' | |||
|
1174 | 1174 | 'repo.pull_request.close', {'data': pr_data}, user, pull_request) |
|
1175 | 1175 | |
|
1176 | 1176 | def close_pull_request_with_comment( |
|
1177 | self, pull_request, user, repo, message=None): | |
|
1177 | self, pull_request, user, repo, message=None, auth_user=None): | |
|
1178 | 1178 | |
|
1179 | 1179 | pull_request_review_status = pull_request.calculated_review_status() |
|
1180 | 1180 | |
@@ -1198,7 +1198,8 b' class PullRequestModel(BaseModel):' | |||
|
1198 | 1198 | pull_request=pull_request.pull_request_id, |
|
1199 | 1199 | status_change=status_lbl, |
|
1200 | 1200 | status_change_type=status, |
|
1201 | closing_pr=True | |
|
1201 | closing_pr=True, | |
|
1202 | auth_user=auth_user, | |
|
1202 | 1203 | ) |
|
1203 | 1204 | |
|
1204 | 1205 | # calculate old status before we change it |
General Comments 0
You need to be logged in to leave comments.
Login now