Add Codeberg as a code platform option#121
Merged
Merged
Conversation
Codeberg logo is too complex for simple svg path definition
as with stars and forks, there may not be a release
Add profile repo key, Codeberg uses .profile like GitHub has .github
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 14 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
src/validateConfig.js:42
- The platform validation comment says PLATFORM is parsed “without whitespace”, but the check does not trim. A config like
PLATFORM: "codeberg "(common copy/paste issue) will be rejected even though the code usestoLowerCase()elsewhere. Trimming here makes validation match the comment and prevents surprising config errors.
const supportedPlatforms = ['github', 'codeberg'];
const platform = config.PLATFORM;
if (!platform || typeof platform !== 'string') {
errors.push('PLATFORM');
} else if (!supportedPlatforms.includes(platform.toLowerCase())) {
egrace479
commented
Jul 10, 2026
hlapp
approved these changes
Jul 10, 2026
hlapp
left a comment
Member
There was a problem hiding this comment.
See two minor inline edit suggestions.
Co-authored-by: Hilmar Lapp <hlapp@drycafe.net>
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.
This PR introduces the option to use Codeberg repositories, instead of GitHub repos. Specifically, defining
PLATFORM: codeberguses the Codeberg API for all code platform-based calls so that the catalog is expected to be run from a Codeberg repo. I did include a note in the personalization documentation regarding the fetch release and tag export scripts, as well as the workflows (they would need some platform-specific edits).I set platform configs at the top of the code fetch file which will facilitate the addition of GitLab as well (see table in #96). Additionally, I switched to using SVGs for the platform logos due to the complexity required for the Codeberg logo.
Only one code platform can be used at a time.
Tested on the Forgejo Codeberg Organization by replacing the following keys in
public/config.yaml:Note: the
ADDITIONAL_REPOSkey was set to an empty list, since it fetches listed repos based onPLATFORMAPI.