Skip to content

Conversation

@brendan-kellam
Copy link
Contributor

@brendan-kellam brendan-kellam commented Jan 13, 2026

Summary by CodeRabbit

  • Refactor
    • Updated configuration handling for GitHub and GitLab API integrations to use dynamically loaded settings instead of environment variables.

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

@cursor
Copy link

cursor bot commented Jan 13, 2026

You have run out of free Bugbot PR reviews for this billing cycle. This will reset on February 14.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@coderabbitai
Copy link

coderabbitai bot commented Jan 13, 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

The accountPermissionSyncer now loads runtime configuration from a config file path instead of using environment variables for GitHub and GitLab API base URLs, sourcing these URLs from the loaded config object.

Changes

Cohort / File(s) Summary
Configuration Loading Refactoring
packages/backend/src/ee/accountPermissionSyncer.ts
Added loadConfig import from @sourcebot/shared. Config is loaded early in runJob via loadConfig(env.CONFIG_PATH). GitHub and GitLab API base URLs now sourced from loaded config object and passed as url parameter to client creation functions instead of using environment variables.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

  • #585: Adds GitLab client integration and permission syncing that works in tandem with these config-driven base URL changes.

Suggested reviewers

  • msukkari
🚥 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 clearly and specifically describes the main change: fixing permission syncing for self-hosted code hosts by loading configuration instead of relying solely on environment variables.
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.

@github-actions

This comment has been minimized.

@brendan-kellam
Copy link
Contributor Author

@coderabbitai review

@coderabbitai
Copy link

coderabbitai bot commented Jan 13, 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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f9f6c71 and 6837bee.

📒 Files selected for processing (1)
  • packages/backend/src/ee/accountPermissionSyncer.ts
🧰 Additional context used
🧬 Code graph analysis (1)
packages/backend/src/ee/accountPermissionSyncer.ts (2)
packages/backend/src/github.ts (1)
  • createOctokitFromToken (49-62)
packages/backend/src/gitlab.ts (1)
  • createGitLabFromOAuthToken (25-34)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
🔇 Additional comments (2)
packages/backend/src/ee/accountPermissionSyncer.ts (2)

3-3: LGTM!

The import of loadConfig from @sourcebot/shared is appropriate for the new runtime configuration approach.


151-152: LGTM!

Loading the config per job execution allows the system to pick up configuration changes dynamically without requiring a worker restart.

@brendan-kellam brendan-kellam merged commit 488b9d1 into main Jan 13, 2026
8 checks passed
@brendan-kellam brendan-kellam deleted the bkellam/fix-SOU-122 branch January 13, 2026 05:21
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.

2 participants