refactor(skills): backend-agnostic git via wire protocol (fixes Gitea/Forgejo) #13
Reference in New Issue
Block a user
Delete Branch "feat/skills-git-backend-agnostic"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
git-sourcemodule that speaks the git smart-HTTP protocol viaisomorphic-git+memfs(no execFile, no tempdirs).https://git.farh.net/<owner>/<repo>): Gitea has no/repos/.../commits/{ref}endpoint, which the previous shim still depended on.onAuthcovers GitHub PATs, GitLab PATs, Gitea/Forgejo tokens.What changed
server/src/services/git-source.tsparseGitSourceUrl— githubtree/blob, gitea/forgejosrc/branch|commit|tag, gitlab/-/tree|blob, bitbucket/src/{ref}, bare clone URLs.resolveGitRef— onegit.listServerRefscall. Handles default branch (HEAD symref), branches, annotated/lightweight tags, SHA passthrough.openRepoSnapshot— shallowsingleBranchclone into in-memory fs;listFilesviagit.walk,readFileviagit.readBlob.company-skills.ts: rewrotereadUrlSkillImports, the update-check, and the on-demand file read to use the new module.hostname/owner/repo/ref/trackingRef/repoSkillDir); existing rows keep working — clone URL is derived at fetch time. No migration.company-portability.tsstill uses the oldgithub-fetch.tsshim (same broken pattern, separate feature). Tracked as a follow-up — not in this PR.Test plan
🤖 Generated with Claude Code