Skip to content

Scope a Forgejo lexicon (github→forgejo CI migration) #338

Closed

Description

@lex00

Epic. Build Forgejo (Codeberg / self-hosted Forgejo / Gitea) CI support as a thin dialect of the github lexicon, plus a github→forgejo compare/migration path. Scope below is grounded in a direct read of the github and gitlab lexicons.

Why Forgejo (research)

The 2026 GitHub exodus — driven by the Copilot training-by-default deadline (April 24 2026), reliability outages, and Copilot nagware — flows overwhelmingly to Codeberg/Forgejo, not GitLab. Verified-completed moves (BookStack, Zig, Gentoo) all landed on Codeberg. "moving to Codeberg" far outnumbers "migrate to GitLab" in GitHub issue search. Forgejo is the engine behind Codeberg, so one package covers Codeberg + self-hosted Forgejo + Gitea. (Full research + verified candidate reckoning lives in local ~/Documents/research/gitlab/.)

Key finding from reading the lexicons

Forgejo Actions YAML is GitHub Actions YAML. The github serializer (lexicons/github/src/serializer.ts) already emits the exact shape Forgejo runs (on:/jobs:/steps:, kebab-case keys, trigger map, multi-file via SerializerResult.files). So Forgejo needs no codegen and no own entity model — it reuses the github lexicon's generated entities. Only the dialect differs:

  • output dir .forgejo/workflows/ (alias .gitea/workflows/)
  • ignored keys permissions, continue-on-error (drop + warn)
  • runner labels/images differ
  • uses: refs don't resolve from a marketplace

This is far cheaper than gitlab, which needed a full separate schema, snake_case serializer, !reference intrinsic, and stage inference.

Architecture (the LexiconPlugin slots to fill)

name, serializer, lintRules/postSynthChecks, intrinsics, initTemplates/detectTemplate, LSP, import, codegen lifecycle, mcpTools/mcpResources, migrationSource(from), skills — same contract as github/src/plugin.ts and gitlab/src/plugin.ts. Reuse the migration model (gitlab/src/migrate/from-github/) and the security-fate engine (security.ts) — but github→forgejo is a thin transform (same language), and its value is the compare (what Forgejo drops), not a heavy transpiler.

Decisions (resolved)

  1. Thin dialect reusing github entities — not a standalone codegen'd lexicon. ✅
  2. Lead with compare/lint, not the transpiler — github→forgejo YAML is near-identical, so the differentiated value is "what Forgejo silently drops". ✅
  3. Runner labels: default with per-project override. ✅
  4. Cover Gitea for free via the .gitea/workflows alias. ✅

Plan (smallest valuable first)

Caveats

Pre-release, no customers — signal-driven, not demand-driven. Validate after P1/P3 before investing in the full P4 surface. Most projects this serves land on Codeberg, which is exactly why this exists.

Activity

  1. added
    enhancement
    on Jun 14, 2026
  2. lex00 commented on Jun 15, 2026

    @lex00
    ContributorAuthor

    All four phases shipped and merged to main — epic complete.

    @intentius/chant-lexicon-forgejo ships as a thin dialect of the github lexicon — one package covers Codeberg, self-hosted Forgejo, and Gitea. Validated end-to-end (chant build → .forgejo/workflows/, chant migrate --to forgejo --validate). Per the epic's gate, P1+P3 delivered the differentiated value before P4 rounded out parity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions