feat: add support for Codeberg repos#62
Conversation
ReviewOverviewAdds Codeberg as a fourth supported host alongside GitHub/GitLab/Bitbucket. Touches URL parsing ( What's good
Suggestions / minor issues
RisksLow. Host detection is additive, cloning goes through VerdictApprove with optional nits. The control-flow suggestion (#1) is the only one I'd push for before merge; the rest can be follow-ups. |
|
Thanks for the review, @nrjdalal! Is there anything I should change for this PR, sorry? |
|
I will do a manual review on/before eow, will change myself or let yk |
Got it. Thanks! |
Replace the catch-all `else` with `else if (host === "codeberg.org")` and add a `never`-typed exhaustive default so adding a new host to the `Host` union without a parser branch becomes a compile error. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Extend codeberg parser to recognize /raw/<branch|tag|commit>/<ref>/path and /media/<branch|tag|commit>/<ref>/path as direct-file (blob) links; /src/... continues to map to tree. Behavior change: pasting a Codeberg raw URL now fetches just the file instead of falling through to a full repository clone. - Add dryRun coverage for the new raw/media URLs and for the previously untested git@codeberg.org: SSH prefix (repo + src path). - Drop the "codeberg" package.json keyword. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Hi! 👋
I maintain two templates on Codeberg (and plan to have more) and I would like to use GitPick as the recommended tool to get a copy of them. Therefore, this PR adds support for Codeberg repos, similar to the other already supported providers.
Considerations
bun run build && bun run dist/index.mjs -i https://codeberg.org/joaopalmeiro/template-rust-scriptbun run build && bun run dist/index.mjs https://codeberg.org/joaopalmeiro/template-rust-script tmpAny feedback, let me know. Thanks!