Is there a way to find repositories generated from my template repository?

GitHub already stores information that a repository has been generated using a template. But there is no way to find out all the repos generated from a specific template. In the API there’s a key for every repo called template_repository where you can find out which template repository has been used to generate the repo but there is no way to search for repositories with a certain value for template_repository.
The only solution I have right now is to use Google or other search engines with a query similar to the one below but that will require that the repositories are indexed by those search engines. "generated from sindresorhus/electron-boilerplate"

Essentially I would like something like the forks page (example) but for template repositories.


Hi @dimitarnestorov!

Thanks for this feedback! We’re always working to improve GitHub and the GitHub Support Community, and we consider every suggestion we receive.

Would you mind submitting this through our official product feedback form so that our product team can track your request?


Done :slightly_smiling_face:
Post must be at least 20 characters


Any progress with this one?

Eureka! After reading this - Search based on the contents of a repository, the answer was clear! Search by file content!

I always use the name of the repository as the title (# terraform-multienv) which is very common, so if you also do that keep on reading.

Use GitHub’s search engine and provide a unique combination of words that appear in your file. This is how I do it for my template - unfor19/terraform-multienv

I use the latter query to get meaningful search results, by sorting with sort:updated and filtering out my user name -user:USERNAME with -QUALIFIER. The keyword @me is a saved keyword given by GitHub.

Originally posted in

1 Like

Hey @dimitarnestorov, any chance you have some code snippets for how you got the template_repository property in the return result? I have implemented the baptiste-preview for listForOrg() function and it gets the is_template property but template_repository doesn’t appear in the result. I just want to make sure I’m not missing anything. Thanks

const templateTeamAssignment = async (context) => {
  const { github, payload } = context;
  const repo =;

  console.log("context", context);

  console.log("stackOverflow", await context.github.repos.get(context.repo()));
    await context.github.repos.listForOrg({
      org: payload.organization.login,
      headers: {
        accept: "application/vnd.github.baptiste-preview+json",

I saw it while messing around with the GraphQL API

Hey @dimitarnestorov, thanks for your reply and sorry for the delay in getting back to you. I managed to get it sorted by moving away from octokit/rest and over towards octokit/request.

const templateTeamAssignment = async (context) => {
  const { github, payload } = context;
  const repo =;

  const repoResult = await github.request("GET /repos/:org/:repo", {
    org: payload.organization.login,
    mediaType: {
      previews: ["baptiste-preview"],
  console.log("repoResult: ", repoResult);

Any news on this? I’d love to add a badge or something to one of my template repositories and it does not seem like their is an easy way to do that.