reviewers: use common function to obtain reviewers with filter of role.
This commit is contained in:
parent
0bbae6c416
commit
16678eb0f8
2 changed files with 2 additions and 2 deletions
|
|
@ -399,7 +399,7 @@ class CommentsModel(BaseModel):
|
|||
recipients += [pull_request_obj.author]
|
||||
|
||||
# add the reviewers to notification
|
||||
recipients += [x.user for x in pull_request_obj.reviewers]
|
||||
recipients += [x.user for x in pull_request_obj.get_pull_request_reviewers()]
|
||||
|
||||
pr_target_repo = pull_request_obj.target_repo
|
||||
pr_source_repo = pull_request_obj.source_repo
|
||||
|
|
|
|||
|
|
@ -1526,7 +1526,7 @@ class PullRequestModel(BaseModel):
|
|||
commit_changes, file_changes):
|
||||
|
||||
updating_user_id = updating_user.user_id
|
||||
reviewers = set([x.user.user_id for x in pull_request.reviewers])
|
||||
reviewers = set([x.user.user_id for x in pull_request.get_pull_request_reviewers()])
|
||||
# NOTE(marcink): send notification to all other users except to
|
||||
# person who updated the PR
|
||||
recipients = reviewers.difference(set([updating_user_id]))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue