partitionReviewersByType splits reviewer identifiers into users, bots, and teams. Team identifiers are in the form "org/slug" and are returned as-is. Bot logins (currently only Copilot) are identified and returned separately.
(values []string)
| 631 | // Team identifiers are in the form "org/slug" and are returned as-is. |
| 632 | // Bot logins (currently only Copilot) are identified and returned separately. |
| 633 | func partitionReviewersByType(values []string) (users []string, bots []string, teams []string) { |
| 634 | for _, v := range values { |
| 635 | if v == "" { |
| 636 | continue |
| 637 | } |
| 638 | if strings.ContainsRune(v, '/') { |
| 639 | // Team: org/slug format, pass as-is |
| 640 | teams = append(teams, v) |
| 641 | } else if v == api.CopilotReviewerLogin { |
| 642 | bots = append(bots, v) |
| 643 | } else { |
| 644 | users = append(users, v) |
| 645 | } |
| 646 | } |
| 647 | return |
| 648 | } |
no outgoing calls
no test coverage detected