diff options
Diffstat (limited to 'lib/gitlab')
-rw-r--r-- | lib/gitlab/reference_extractor.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/gitlab/reference_extractor.rb b/lib/gitlab/reference_extractor.rb index 3bf6f14a7bc..422d35aceb7 100644 --- a/lib/gitlab/reference_extractor.rb +++ b/lib/gitlab/reference_extractor.rb @@ -34,8 +34,16 @@ module Gitlab def users references[:users].map do |entry| - project.users.where(username: entry[:id]).first - end.compact + if entry[:id] == "all" + project.team.members.flatten + elsif namespace = Namespace.find_by(path: entry[:id]) + if namespace.is_a?(Group) + namespace.users + else + namespace.owner + end + end + end.flatten.compact end def labels |