Skip to content

feat: add Gitea source-control provider - #8232

Closed
MDragonryu wants to merge 15 commits into
pingdotgg:mainfrom
MDragonryu:feat/gitea-source-control-provider
Closed

MDragonryu wants to merge 15 commits into
pingdotgg:mainfrom
MDragonryu:feat/gitea-source-control-provider

Conversation

@MDragonryu

@MDragonryu MDragonryu commented Aug 25, 2026 •

Copy link
Copy Markdown

Summary

  • add Gitea discovery and authentication through tea
  • implement repository, branch, pull-request, and provider operations
  • wire Gitea through server, web, mobile, contracts, Git actions, and documentation
  • add focused coverage for CLI parsing, provider behavior, registry discovery, and source-control contracts

Testing

  • CI=true pnpm exec vp test run apps/server/src/sourceControl/GiteaCli.test.ts apps/server/src/sourceControl/GiteaSourceControlProvider.test.ts apps/server/src/sourceControl/giteaLogins.test.ts apps/server/src/sourceControl/SourceControlProviderRegistry.test.ts packages/shared/src/sourceControl.test.ts packages/contracts/src/sourceControl.test.ts
  • 6 test files passed, 109 tests passed
  • live validation completed against a fresh Gitea container with repository, commit/push, and three pull-request scenarios

Notes

Gitea support uses the authenticated tea CLI and preserves the existing provider architecture across server and clients.


Note

Medium Risk
Changes git stacked actions, PR creation/deduping, and remote provider resolution; behavior is heavily tested but errors could still mis-route remotes or mishandle tea HTTP responses.

Overview
Adds first-class Gitea support end-to-end so remotes no longer resolve to unknown and Commit, push & create PR works against Gitea hosts.

On the server, a new GiteaCli layer wraps the tea tool (API calls with HTTP status parsing because tea api exits 0 on errors, client-side PR list filtering/pagination, repo publish routing to user/repos vs orgs/.../repos). GiteaSourceControlProvider plugs into the existing registry with CLI discovery from tea logins list and host-based refinement of otherwise-unknown self-hosted remotes when tea is logged into that host.

Contracts, shared remote detection (gitea.com / *gitea* hosts), web and mobile add-project/publish/settings flows, and docs are extended for gitea. Publish UI uses discovery for hostname when there is no canonical host. In-app deep links still skip Gitea (parseChangeRequestUrl does not claim /pulls/{n}), while checkout/reference parsing accepts Gitea URLs and tea pulls checkout.

VcsProcess now treats tea’s “no available login” stderr as an authentication failure.

Reviewed by Cursor Bugbot for commit d1b9069. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Add Gitea source-control provider across backend, web, and mobile

  • Implements GiteaCli wrapper around the tea CLI in GiteaCli.ts, covering PR list/get/create, repo creation, clone URLs, default branch, and checkout, with typed errors and HTTP status mapping.
  • Adds GiteaSourceControlProvider in GiteaSourceControlProvider.ts implementing the provider contract, plus discovery and auth parsing based on tea logins list output.
  • Wires Gitea into the server provider registry and WebSocket RPC layers in server.ts and ws.ts.
  • Updates web, mobile, and shared packages: command palette, publish dialog, PR reference parsing, settings UI, icons, and provider detection.
  • Risk: new 'gitea' literal added to SourceControlProviderKind schema in sourceControl.ts; out-of-tree contract consumers must regenerate schemas to decode the new kind.

Macroscope summarized d1b9069.

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

Labels

size:XXL 1,000+ changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants