Show More
@@ -677,7 +677,8 b' def create_pull_request(' | |||
|
677 | 677 | [commit.raw_id for commit in reversed(commit_ranges)]), |
|
678 | 678 | reviewers=reviewers, |
|
679 | 679 | title=title, |
|
680 | description=Optional.extract(description) | |
|
680 | description=Optional.extract(description), | |
|
681 | auth_user=apiuser | |
|
681 | 682 | ) |
|
682 | 683 | |
|
683 | 684 | Session().commit() |
@@ -894,7 +894,8 b' class RepoPullRequestsView(RepoAppView, ' | |||
|
894 | 894 | pull_request = PullRequestModel().create( |
|
895 | 895 | self._rhodecode_user.user_id, source_repo, source_ref, |
|
896 | 896 | target_repo, target_ref, commit_ids, reviewers, |
|
897 | pullrequest_title, description, reviewer_rules | |
|
897 | pullrequest_title, description, reviewer_rules, | |
|
898 | auth_user=self._rhodecode_user | |
|
898 | 899 | ) |
|
899 | 900 | Session().commit() |
|
900 | 901 | |
@@ -1203,7 +1204,8 b' class RepoPullRequestsView(RepoAppView, ' | |||
|
1203 | 1204 | status_change_type=(status |
|
1204 | 1205 | if status and allowed_to_change_status else None), |
|
1205 | 1206 | comment_type=comment_type, |
|
1206 | resolves_comment_id=resolves_comment_id | |
|
1207 | resolves_comment_id=resolves_comment_id, | |
|
1208 | auth_user=self._rhodecode_user | |
|
1207 | 1209 | ) |
|
1208 | 1210 | |
|
1209 | 1211 | if allowed_to_change_status: |
@@ -444,10 +444,11 b' class PullRequestModel(BaseModel):' | |||
|
444 | 444 | |
|
445 | 445 | def create(self, created_by, source_repo, source_ref, target_repo, |
|
446 | 446 | target_ref, revisions, reviewers, title, description=None, |
|
447 | reviewer_data=None, translator=None): | |
|
447 | reviewer_data=None, translator=None, auth_user=None): | |
|
448 | 448 | translator = translator or get_current_request().translate |
|
449 | 449 | |
|
450 | 450 | created_by_user = self._get_user(created_by) |
|
451 | auth_user = auth_user or created_by_user | |
|
451 | 452 | source_repo = self._get_repo(source_repo) |
|
452 | 453 | target_repo = self._get_repo(target_repo) |
|
453 | 454 | |
@@ -537,7 +538,7 b' class PullRequestModel(BaseModel):' | |||
|
537 | 538 | creation_data = pull_request.get_api_data(with_merge_state=False) |
|
538 | 539 | self._log_audit_action( |
|
539 | 540 | 'repo.pull_request.create', {'data': creation_data}, |
|
540 |
|
|
|
541 | auth_user, pull_request) | |
|
541 | 542 | |
|
542 | 543 | return pull_request |
|
543 | 544 |
General Comments 0
You need to be logged in to leave comments.
Login now