Fix Author URL in template deployments#10535
Conversation
📝 WalkthroughWalkthroughA new public constant Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
⏰ 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). (2)
🔇 Additional comments (1)
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. Comment |
Security Scan Results for PRDocker Image Scan Results
Source Code Scan Results🎉 No vulnerabilities found! |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
src/Appwrite/Platform/Modules/Functions/Workers/Builds.php (2)
456-461: Use repo‑local git config and safer commit message quotingAvoid global git config side‑effects and quote the message once end‑to‑end.
Apply:
- $exit = Console::execute('git config --global user.email '. \escapeshellarg(APP_VCS_GITHUB_EMAIL) .' && git config --global user.name '. \escapeshellarg(APP_VCS_GITHUB_USERNAME) .' && cd ' . \escapeshellarg($tmpDirectory) . ' && git checkout -b ' . \escapeshellarg($branchName) . ' && git add . && git commit -m "Create ' . \escapeshellarg($resource->getAttribute('name', '')) . ' function" && git push origin ' . \escapeshellarg($branchName), '', $stdout, $stderr); + $commitMessage = sprintf("Create '%s' function", $resource->getAttribute('name', '')); + $exit = Console::execute( + 'cd ' . \escapeshellarg($tmpDirectory) + . ' && git config user.email ' . \escapeshellarg(APP_VCS_GITHUB_EMAIL) + . ' && git config user.name ' . \escapeshellarg(APP_VCS_GITHUB_USERNAME) + . ' && git checkout -b ' . \escapeshellarg($branchName) + . ' && git add .' + . ' && git commit -m ' . \escapeshellarg($commitMessage) + . ' && git push origin ' . \escapeshellarg($branchName), + '', + $stdout, + $stderr + );
472-473: Optional: align display name with URL (if desired)If the intent is to show “Team Appwrite” as the author name on commits, consider updating APP_VCS_GITHUB_USERNAME accordingly; otherwise “Appwrite” name + TeamAppwrite URL is acceptable.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
app/init/constants.php(1 hunks)src/Appwrite/Platform/Modules/Functions/Workers/Builds.php(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-07-08T01:20:14.364Z
Learnt from: stnguyen90
PR: appwrite/appwrite#10119
File: app/controllers/api/account.php:1226-1232
Timestamp: 2025-07-08T01:20:14.364Z
Learning: In Appwrite, `_APP_DOMAIN` is a required environment variable that must always be set for the system to function properly.
Applied to files:
app/init/constants.php
⏰ 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). (3)
- GitHub Check: Setup & Build Appwrite Image
- GitHub Check: Setup & Build Appwrite Image
- GitHub Check: scan
🔇 Additional comments (2)
src/Appwrite/Platform/Modules/Functions/Workers/Builds.php (1)
472-473: Correct author fields for template commitsUsing APP_VCS_GITHUB_URL and APP_VCS_GITHUB_USERNAME here ensures template deployments point to Team Appwrite consistently. ✅
Please confirm this block only runs for “VCS + Template” merges so user-origin commits aren’t overwritten.
app/init/constants.php (1)
88-88: Approve: APP_VCS_GITHUB_URL centralized; verification passedConfirmed setAttribute('providerCommitAuthorUrl') uses APP_VCS_GITHUB_URL (src/Appwrite/Platform/Modules/Functions/Workers/Builds.php:472). No other providerCommitAuthorUrl instances found. Repository/branch/commit GitHub URLs remain as literals (e.g. Builds.php:475; src/Appwrite/Platform/Modules/Compute/Base.php:48/62/137/151) — expected and unrelated to the author-profile constant.
✨ Benchmark results
⚡ Benchmark Comparison
|
What does this PR do?
Change value from user profile to point to Team Appwrite's profile for template deployments.
Test Plan
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Screenshots may also be helpful.)
Related PRs and Issues
Checklist