diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-23 18:07:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-23 18:07:42 +0300 |
commit | bc0f141f2f073a971aad1eb5349bb718747df028 (patch) | |
tree | 72fcc48dfac8e3f3560e22014eacdd2eaae8bc89 /app/models/merge_request | |
parent | 2c29837ce1692790dedccbc9b36b44dc8aaacbee (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/merge_request')
-rw-r--r-- | app/models/merge_request/predictions.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/models/merge_request/predictions.rb b/app/models/merge_request/predictions.rb index ef9e00b5f74..61494ca584c 100644 --- a/app/models/merge_request/predictions.rb +++ b/app/models/merge_request/predictions.rb @@ -4,4 +4,13 @@ class MergeRequest::Predictions < ApplicationRecord # rubocop:disable Style/Cla belongs_to :merge_request, inverse_of: :predictions validates :suggested_reviewers, json_schema: { filename: 'merge_request_predictions_suggested_reviewers' } + validates :accepted_reviewers, json_schema: { filename: 'merge_request_predictions_accepted_reviewers' } + + def suggested_reviewer_usernames + Array.wrap(suggested_reviewers['reviewers']) + end + + def accepted_reviewer_usernames + Array.wrap(accepted_reviewers['reviewers']) + end end |