Code Insights: Fetch a first indexed repository URL for the first demo section on the in-product landing page
Created by: vovakulikov
Background
What is the right value for the repositories field for the code insights demo? Currently, we use github.com/sourcegraph/sourcegrpah repo for the repo field and on the k8s it looks good.
But our on-prem customers don't have sourcegraph repo in their index DB so we will have a validation error about this repo value as soon as the page is rendered.
So possible options here
- We should somehow process customer repos and pick the right one for the demo insight landing page. This implies some effort from backend engineers and as we discussed this on the last team sync we couldn't process repo on BE to be 100% that this repo is a good candidate for the TODO (or any other) demo code insights.
- Fetch the first indexed on the frontend and put this URL in the repositories field. This is chip and should be easy to do but in this option, there is no guarantee that this repo is a good candidate for the TODO example. It might be some non-tech-related repo there is no TODO and hence it would be a flat (no-data) chart.
query FirstIndexedRepository {
repositories(first: 1) {
nodes {
name
}
}
}
- Do nothing and leave this field empty and let users fill this field out by themself, hopefully, we have suggestions over this field so it should be easy to do for them.