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)
| 542 | // Team identifiers are in the form "org/slug" and are returned as-is. |
| 543 | // Bot logins (currently only Copilot) are identified and returned separately. |
| 544 | func partitionReviewersByType(values []string) (users []string, bots []string, teams []string) { |
| 545 | for _, v := range values { |
| 546 | if v == "" { |
| 547 | continue |
| 548 | } |
| 549 | if strings.ContainsRune(v, '/') { |
| 550 | // Team: org/slug format, pass as-is |
| 551 | teams = append(teams, v) |
| 552 | } else if v == api.CopilotReviewerLogin { |
| 553 | bots = append(bots, v) |
| 554 | } else { |
| 555 | users = append(users, v) |
| 556 | } |
| 557 | } |
| 558 | return |
| 559 | } |
no outgoing calls
no test coverage detected