Repository navigation
feat: add Gitea source-control provider - #8232
Closed
MDragonryu wants to merge 15 commits into
Closed
MDragonryu wants to merge 15 commits into
MDragonryu wants to merge 15 commits into
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
teaTesting
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.tsNotes
Gitea support uses the authenticated
teaCLI 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
teaHTTP responses.Overview
Adds first-class Gitea support end-to-end so remotes no longer resolve to
unknownand Commit, push & create PR works against Gitea hosts.On the server, a new
GiteaClilayer wraps theteatool (API calls with HTTP status parsing becausetea apiexits 0 on errors, client-side PR list filtering/pagination, repo publish routing touser/reposvsorgs/.../repos).GiteaSourceControlProviderplugs into the existing registry with CLI discovery fromtea logins listand host-based refinement of otherwise-unknown self-hosted remotes whenteais logged into that host.Contracts, shared remote detection (
gitea.com/*gitea*hosts), web and mobile add-project/publish/settings flows, and docs are extended forgitea. Publish UI uses discovery for hostname when there is no canonical host. In-app deep links still skip Gitea (parseChangeRequestUrldoes not claim/pulls/{n}), while checkout/reference parsing accepts Gitea URLs andtea pulls checkout.VcsProcessnow treatstea’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
GiteaCliwrapper around theteaCLI in GiteaCli.ts, covering PR list/get/create, repo creation, clone URLs, default branch, and checkout, with typed errors and HTTP status mapping.GiteaSourceControlProviderin GiteaSourceControlProvider.ts implementing the provider contract, plus discovery and auth parsing based ontea logins listoutput.'gitea'literal added toSourceControlProviderKindschema in sourceControl.ts; out-of-tree contract consumers must regenerate schemas to decode the new kind.Macroscope summarized d1b9069.