We won't be able to only use GitHub's code search endpoint for this: the endpoint has still not been updated to use a query syntax allowing to match paths with regex and glob patterns. Also, a limitation of the search API is that forks are not indexed if they have less stars than the original repository (I haven't tested this behavior extensively but it is mentioned in the documentation).
I think the best approach we can use at this point is to get a list of all nodes through the git tree endpoint and match the suggest query ourselves.
This is not ideal, however, because we won't be able to match the page title with this method. To match a page title, we would need to use the code search endpoint with the following query: q=repo%3A<username>%2F<reponame>%20fork%3Atrue%20%22name%22%3A%22<query> But we would still have the same limitations: no regex (so, only exact match from the start of the query) and no support for forks with less stars than the original repo...
This message was sent by Atlassian Jira (v9.3.0#930000-sha1:287aeb6)
If image attachments aren't displayed, see this article.