Repository navigation
feat(import): gitea handler to import repositories from Gitea/Forgejo - #249
Merged
Merged
Conversation
Lists the repositories of an organization (or everything the token can see) and emits one repository import per repo, like the GitHub and GitLab handlers. Gitea hosts get the right icon, category and source links. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…g import The github, gitlab and gitea listing imports pass gitService (default Git:Github, Git:Gitlab, Git:Gitea) to their repository child imports. The repository handler uses it for suppliedBy and falls back to guessing from the clone URL only for hand-written repository imports, so Gitea repositories are no longer attributed to Git:Gitlab. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
giteaimport handler (handlers/gitea.rb), modelled ongithub: lists repositories and emits onerepositorychild import per repo (clone over SSH, analysis as for GitHub/GitLab).host(required), optionalorg(without it all repositories the token can see via/repos/search),scheme,verifySSL,rateLimitMs, plus the usual team/visibility/cache keys. Token fromGITEA_TOKEN(Authorization: token).page). Stale clones are pruned per owner directory (cacheRoot/gitea/<host>/<owner>)./src/branch|commit/source links inGitSource, icon/category inHelpersand the frontend, "Gitea"/"Forgejo" link labels (also matches Forgejo and Codeberg hosts).docs/import.md(newgiteasection), configuration and importing-data pages.Test plan
test/import/handlers/gitea_handler_test.rb(token/host errors, org and search listing, pagination, repeat-page guard, HTTP errors, team propagation, pruning, clone path), git_source and helpers testsarchsight importagainst a local fake Gitea API generated the childrepositoryimport;archsight lintpasses.gitea/workflowsdetection in git analytics (follow-up)🤖 Generated with Claude Code