feat(prd-1): complete M9 - documentation & upstream merge validation

- Created docs/forgejo.md: comprehensive setup guide (prerequisites,
  quick start, platform detection, GitHub differences, CI workflows,
  upstream merge process, known limitations, troubleshooting)
- Updated README.md with Forgejo support mention and docs link
- Updated CLAUDE.md with Forgejo architecture section
- Added platform input to docs/usage.md inputs table
- Added 5 Forgejo FAQ entries to docs/faq.md
- Upstream merge validated: zero conflicts (based on latest upstream)
- PRD #1 100% complete: all milestones M1-M9 done, 794 tests passing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Vlad MocanuandClaude Opus 4.6 committed 2026-02-25 19:55:25 +02:00
1 parent 5daed4f9bf
commit 44f598ff11
6 files changed
+285 -3

No files matched your search

+24
View File
@@ -36,6 +36,30 @@ Single entrypoint: `src/entrypoints/run.ts` orchestrates everything — prepare
- **`action.yml` outputs reference step IDs**: Outputs like `execution_file`, `branch_name`, `github_token` reference `steps.run.outputs.*`. If you rename the step ID, update the outputs section too.
- **Integration testing** happens in a separate repo (`install-test`), not here. The tests in this repo are unit tests.
## Forgejo Platform Support
This fork adds Forgejo support via a lean adapter pattern — only 4 genuinely different areas have Forgejo-specific code:
- **`src/platform/detector.ts`** — Three-tier platform detection (explicit input > `FORGEJO` env > `GITHUB_SERVER_URL` heuristic)
- **`src/forgejo/token.ts`** — Direct token handling (skips OIDC exchange)
- **`src/forgejo/data/fetcher.ts`** — REST-based data fetching (replaces 3 GraphQL queries with 5-8 parallel REST calls)
- **`src/forgejo/comment-logic.ts`** — Forgejo URL patterns for tracking comments
All other `src/github/` modules work on Forgejo via Octokit REST as-is (permissions, comments, branches, git config, context, formatter).
**Key integration points** (these files have platform branches and are merge-conflict surface):
- `src/entrypoints/run.ts` — Platform branch at top for token setup
- `src/modes/tag/index.ts` — Data fetcher swap (`fetchForgejoData` vs `fetchGitHubData`)
- `src/github/operations/comments/create-initial.ts` — Platform-aware spinner/URL format
- `src/github/operations/comments/update-with-branch.ts` — Forgejo PR compare URL
- `src/github/validation/actor.ts` — Skipped on Forgejo (no bot accounts)
- `src/mcp/install-mcp-server.ts` — Skips GitHub public MCP server on Forgejo
**MCP server names stay the same** (`github_comment`, `github_ci`, etc.) even on Forgejo — changing them would require updating hardcoded tool name lists in `src/modes/tag/index.ts`.
**CI**: `.forgejo/workflows/` contains `ci.yml`, `test-action.yml`, and `upstream-sync.yml`. Unit tests run with `GITHUB_SERVER_URL=https://github.com` override on Forgejo runners.
## Code Conventions
- Runtime is Bun, not Node. Use `bun test`, not `jest`.