Skip to content

Conversation

@msukkari
Copy link
Contributor

@msukkari msukkari commented Jan 16, 2026

  • undefined check for token when initializing gitlab api object
  • fixes incorrect logic for isGitlabCloud and isGitHubCloud
  • fixes minor bugs for log statements

Summary by CodeRabbit

Bug Fixes

  • Fixed authentication errors when attempting to sync public projects without a configured authentication token
  • Improved default authentication handling for public cloud services when custom configurations are not provided

✏️ Tip: You can customize this high-level summary in your review settings.

@msukkari
Copy link
Contributor Author

@coderabbitai review

@github-actions

This comment has been minimized.

@coderabbitai
Copy link

coderabbitai bot commented Jan 16, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai
Copy link

coderabbitai bot commented Jan 16, 2026

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

This PR modifies authentication defaults for GitHub and GitLab client factories, changing cloud service detection to default to true when no custom URL is provided, and conditionally includes authentication tokens only when present. Includes a CHANGELOG entry documenting an authentication fix and logger method corrections.

Changes

Cohort / File(s) Summary
Documentation
CHANGELOG.md
Added entry under Unreleased/Fixed describing authentication error fix for syncing public gitlab.com projects with no token
GitHub Client Factory
packages/backend/src/github.ts
Changed isGitHubCloud default from false to true when no URL is provided in createOctokitFromToken
GitLab Client Factories
packages/backend/src/gitlab.ts
Changed isGitLabCloud default from false to true when no URL is provided in both createGitLabFromPersonalAccessToken and createGitLabFromOAuthToken; conditionally include token/oauthToken in Gitlab constructor only if present; updated logger method calls from logger.warning to logger.warn
Repository Permission Syncer
packages/backend/src/ee/repoPermissionSyncer.ts
Changed GitHub cloud detection to default isGitHubCloud to true when credentials.hostUrl is absent

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main fix: addressing authentication errors when syncing public GitLab projects without a token, which aligns with the code changes (undefined token checks and isGitLabCloud defaults).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

brendan-kellam
brendan-kellam previously approved these changes Jan 16, 2026
@msukkari msukkari merged commit 9a70366 into main Jan 16, 2026
8 checks passed
@msukkari msukkari deleted the michael/sou-220-bug-unable-to-clone-public-gitlab-repos-from-gitlabcom-with branch January 16, 2026 04:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants