Skip to content

Add sync-repos workflow to auto-discover repos with arch-docs #8

@jonathanpopham

Description

@jonathanpopham

Context

There are 53 repos in the org with arch-docs.yml workflows, but only 33 are listed in repos.yaml. Missing repos include: next.js, django, transformers, supabase, deno, bun, go, rust, spring-boot, spring-framework, guava, elasticsearch, kafka, flink, pytorch, nest, prisma, webpack, grafana, volt, toolate-tv, openclaw.

Requirements

Create .github/workflows/sync-repos.yml that:

  1. Runs on schedule — every 6 hours (cron: '0 */6 * *') + workflow_dispatch for manual trigger
  2. Scans all org repos — use gh api --paginate "orgs/supermodeltools/repos?per_page=100&type=all" to list all repos
  3. Checks for arch-docs — for each repo, check if .github/workflows/arch-docs.yml exists
  4. Skips repos already in repos.yaml — grep for name: {repo_name} to avoid duplicates
  5. Skips supermodeltools.github.io itself
  6. Adds missing repos to repos.yaml using yq:
    • Forks (.fork == true) → append to .categories[1].repos (Community)
    • Org-native repos → append to .categories[0].repos (Supermodel Open Source)
    • Pull description from GitHub API (.description)
    • Map .language to pill/pill_class:
      • JavaScript/TypeScript → pill-blue
      • Python → pill-green
      • Go/Rust/C/C++ → pill-accent
      • Java/Kotlin/Scala/Ruby/Swift → pill-orange
      • Shell/HCL → DevOps, pill-green
    • For forks, include upstream: {parent.full_name}
  7. Commit and push if any repos were added — use supermodel-bot as committer, message: Sync N repo(s) discovered with arch-docs
  8. Use concurrency group add-repo with cancel-in-progress: false

Secrets needed

The workflow needs a BOT_TOKEN secret (GitHub PAT) with repo scope to push commits that trigger the build-index.yml workflow. The default GITHUB_TOKEN won't trigger downstream workflows.

Note: If BOT_TOKEN doesn't exist yet, document that it needs to be created and use ${{ secrets.GITHUB_TOKEN }} as fallback with a comment explaining the limitation.

Reference

A previous version of this workflow existed in commit 1a7a04f — you can reference it with git show 1a7a04f -- .github/workflows/sync-repos.yml.

Acceptance criteria

  • Workflow runs successfully on manual trigger
  • Missing repos are added to correct categories in repos.yaml
  • Fork repos get upstream field set
  • No duplicate entries created
  • Push triggers build-index.yml to rebuild the site

@claude

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions