TestsSIGs uses the IssueCreator's OwnerMapper to look up the SIGs for a list of tests. The number of SIGs returned is limited by MaxSIGCount. The return value is a map from sigs to the tests from testNames that each sig owns.
(testNames []string)
| 401 | // The number of SIGs returned is limited by MaxSIGCount. |
| 402 | // The return value is a map from sigs to the tests from testNames that each sig owns. |
| 403 | func (c *IssueCreator) TestsSIGs(testNames []string) map[string][]string { |
| 404 | if c.Owners == nil { |
| 405 | return nil |
| 406 | } |
| 407 | sigs := make(map[string][]string) |
| 408 | for _, test := range testNames { |
| 409 | sig := c.Owners.TestSIG(test) |
| 410 | if sig == "" { |
| 411 | continue |
| 412 | } |
| 413 | |
| 414 | if len(sigs) >= c.MaxSIGCount { |
| 415 | if tests, ok := sigs[sig]; ok { |
| 416 | sigs[sig] = append(tests, test) |
| 417 | } |
| 418 | } else { |
| 419 | sigs[sig] = append(sigs[sig], test) |
| 420 | } |
| 421 | } |
| 422 | return sigs |
| 423 | } |
| 424 | |
| 425 | // TestsOwners uses the IssueCreator's OwnerMapper to look up the users assigned to a list of tests. |
| 426 | // The number of users returned is limited by MaxAssignees. |