Skip to content

fix: Use APP_DOMAIN env var for bot user email#9262

Open
okxint wants to merge 1 commit into
makeplane:previewfrom
okxint:fix/bot-user-domain-env-var
Open

fix: Use APP_DOMAIN env var for bot user email#9262
okxint wants to merge 1 commit into
makeplane:previewfrom
okxint:fix/bot-user-domain-env-var

Conversation

@okxint

@okxint okxint commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Bot user email was hardcoded as bot_user_{id}@plane.so during workspace seeding. Self-hosted instances with a custom APP_DOMAIN would end up with bot accounts on the wrong domain.

Replaced the hardcoded domain with os.environ.get('APP_DOMAIN', 'plane.so') — defaults to plane.so so Plane Cloud is unaffected.

Closes #9251

Summary by CodeRabbit

  • Chores
    • Enhanced workspace initialization to support configurable bot user email domains via environment settings, with a fallback to the default domain when not specified.

…lane.so

Signed-off-by: okxint <cashmein.eth@gmail.com>
@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c43c941a-f583-4cd4-95ca-84d10b9a05d9

📥 Commits

Reviewing files that changed from the base of the PR and between 53a323d and 04826a2.

📒 Files selected for processing (1)
  • apps/api/plane/bgtasks/workspace_seed_task.py

📝 Walkthrough

Walkthrough

The bot user email address generated during workspace seeding in workspace_seed_task.py is changed from a hardcoded plane.so domain to one derived from the APP_DOMAIN environment variable, with plane.so retained as the fallback value.

Changes

Bot User Email Domain Configuration

Layer / File(s) Summary
Configurable bot email domain
apps/api/plane/bgtasks/workspace_seed_task.py
Bot user seeded email domain now uses os.environ.get("APP_DOMAIN", "plane.so") instead of the hardcoded string plane.so.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐇 A domain once hardcoded, now free to roam,
APP_DOMAIN points each bot right back to home.
No longer locked to plane.so by name,
Self-hosters rejoice — their domain's in the game!
One line changed, the rabbit hops away. 🌟

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: using APP_DOMAIN env var instead of hardcoded domain for bot user email.
Description check ✅ Passed The description explains the problem and solution clearly. However, it lacks the structured template sections (Type of Change, Test Scenarios, Screenshots).
Linked Issues check ✅ Passed The PR fully addresses issue #9251 by replacing hardcoded plane.so with APP_DOMAIN env var with fallback, meeting all coding requirements.
Out of Scope Changes check ✅ Passed All changes are directly related to fixing the bot user email domain issue in workspace seeding, with no out-of-scope modifications.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@MagicRB

MagicRB commented Jun 18, 2026

Copy link
Copy Markdown

Shouldn't this go through the proper configuration system that plane has? reading it directly from the environment there is very side effectful and possibly unexpected. As far as I am aware APP_DOMAIN wasn't used by anything except to set other configuration options outside of plane (in the surrounding bash scripting). As such some folks might assume it's safe to remove post initialization as, again afaik plane won't unset configuration variables, when it doesn't see the accompanying environment variable. It shouldn't affect anything as this code should only be ran on instance init, but it still feels super hacky.

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.

[bug]: plan.so is hardcoded into bot user email

2 participants