mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 22:43:42 +00:00
Previously, the GitLab webhook code, namely the `get_objects_assignee` method first tried to get a single assignee and if that failed then it looks for multiple assignees and then it would return the first assignee that it found (there's actually a code smell here - a loop which would always return on the first iteration). Instead, this commit will change that behavior to first check for multiple assignees first then for a single assignee if we can't find multiple assignees. Ultimately it will return a list of all of the assignees (however many that might be [0, n]). This method has then aptly been renamed to `get_assignees`. Finally, we tweked the code using this method to always use it's output as an "assignees" parameter to templates (there's also an assignee parameter which we want to avoid here for consistency). Signed-off-by: Hemanth V. Alluri <hdrive1999@gmail.com>
35 KiB
35 KiB