extractTeamSlugs extracts just the slug portion from team identifiers. Team identifiers can be in "org/slug" format; this returns just the slug.
(teams []string)
| 678 | // extractTeamSlugs extracts just the slug portion from team identifiers. |
| 679 | // Team identifiers can be in "org/slug" format; this returns just the slug. |
| 680 | func extractTeamSlugs(teams []string) []string { |
| 681 | slugs := make([]string, 0, len(teams)) |
| 682 | for _, t := range teams { |
| 683 | if t == "" { |
| 684 | continue |
| 685 | } |
| 686 | s := strings.SplitN(t, "/", 2) |
| 687 | slugs = append(slugs, s[len(s)-1]) |
| 688 | } |
| 689 | return slugs |
| 690 | } |
| 691 | |
| 692 | // toGitHubV4Strings converts a string slice to a githubv4.String slice, |
| 693 | // optionally appending a suffix to each element. |
no outgoing calls
no test coverage detected