(e entities.Entity, query string)
| 686 | } |
| 687 | |
| 688 | func matchesQuery(e entities.Entity, query string) bool { |
| 689 | if strings.Contains(strings.ToLower(e.Name), query) { |
| 690 | return true |
| 691 | } |
| 692 | if strings.Contains(strings.ToLower(e.Description), query) { |
| 693 | return true |
| 694 | } |
| 695 | for _, tag := range e.Tags { |
| 696 | if strings.Contains(strings.ToLower(tag), query) { |
| 697 | return true |
| 698 | } |
| 699 | } |
| 700 | if e.Repo != nil { |
| 701 | repoStr := strings.ToLower(e.Repo.Owner + "/" + e.Repo.Name) |
| 702 | if strings.Contains(repoStr, query) { |
| 703 | return true |
| 704 | } |
| 705 | } |
| 706 | return false |
| 707 | } |
| 708 | |
| 709 | // filterValidSkillResults filters GitHub search results to only those that |
| 710 | // follow the skill standard: valid path convention + valid skill name. |
no outgoing calls
no test coverage detected