rankGHResults sorts GitHub search results by relevance score (highest first).
(results []ghSearchResult, query string)
| 720 | |
| 721 | // rankGHResults sorts GitHub search results by relevance score (highest first). |
| 722 | func rankGHResults(results []ghSearchResult, query string) { |
| 723 | sort.SliceStable(results, func(i, j int) bool { |
| 724 | si := relevanceScore(results[i].Name, results[i].Description, results[i].Repo, results[i].Stars, query) |
| 725 | sj := relevanceScore(results[j].Name, results[j].Description, results[j].Repo, results[j].Stars, query) |
| 726 | return si > sj |
| 727 | }) |
| 728 | } |
| 729 | |
| 730 | // searchConfiguredReposTiered searches configured repos and returns results |
| 731 | // split into two tiers: local (from skill_repos.json) and remote (from config.yaml). |
no test coverage detected