Skip to content

Fix Author URL in template deployments#10535

Merged
Meldiron merged 2 commits into1.8.xfrom
fix-author-url-in-template-deployments
Oct 22, 2025
Merged

Fix Author URL in template deployments#10535
Meldiron merged 2 commits into1.8.xfrom
fix-author-url-in-template-deployments

Conversation

@vermakhushboo
Copy link
Copy Markdown
Contributor

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

  • (Related PR or issue)

Checklist

  • Have you read the Contributing Guidelines on issues?
  • If the PR includes a change to an API's metadata (desc, label, params, etc.), does it also include updated API specs and example docs?

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Sep 22, 2025

📝 Walkthrough

Walkthrough

A new public constant APP_VCS_GITHUB_URL = 'https://github.com/TeamAppwrite' was added to app/init/constants.php. In src/Appwrite/Platform/Modules/Functions/Workers/Builds.php, code that previously constructed an author URL from cloneOwner and used the literal author name 'Appwrite' was replaced to use the constants APP_VCS_GITHUB_URL and APP_VCS_GITHUB_USERNAME. Other deployment attributes were not changed.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • Meldiron
  • adityaoberai
  • loks0n

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The pull request title "Fix Author URL in template deployments" accurately describes the main change in the changeset. The PR adds a new constant APP_VCS_GITHUB_URL pointing to Team Appwrite's GitHub profile and refactors the Builds.php file to use this constant instead of dynamic construction. The title is concise, clear, and specific enough for teammates to understand the primary purpose of the changes—fixing the author URL to point to Team Appwrite's profile for template deployments. It avoids vague terminology and directly relates to the core modification.
Description Check ✅ Passed The pull request description "Change value from user profile to point to Team Appwrite's profile for template deployments" is directly related to the changeset. It explains the intent of the changes—replacing dynamic author URL construction with a constant pointing to Team Appwrite's GitHub profile. The description is clear and meaningfully conveys what is being changed and why, meeting the lenient criteria for this check that only requires the description to be related to the changeset in some way.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-author-url-in-template-deployments

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5d5c1d8 and 9c55da5.

📒 Files selected for processing (1)
  • app/init/constants.php (1 hunks)
⏰ 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)
  • GitHub Check: Benchmark
  • GitHub Check: scan
🔇 Additional comments (1)
app/init/constants.php (1)

91-93: The constants APP_VCS_GITHUB_USERNAME and APP_VCS_GITHUB_URL serve different purposes and are not meant to reference the same entity. APP_VCS_GITHUB_USERNAME is used as the git commit author name, while APP_VCS_GITHUB_URL is stored as deployment metadata (providerCommitAuthorUrl). This intentional separation aligns with the PR's goal to point template deployments to the TeamAppwrite organization while maintaining the Appwrite username for git operations.

Likely an incorrect or invalid review comment.


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
Copy link
Copy Markdown

github-actions bot commented Sep 22, 2025

Security Scan Results for PR

Docker Image Scan Results

Package Version Vulnerability Severity
binutils 2.44-r2 CVE-2025-5244 HIGH
binutils 2.44-r2 CVE-2025-5245 HIGH
libxml2 2.13.8-r0 CVE-2025-49794 CRITICAL
libxml2 2.13.8-r0 CVE-2025-49796 CRITICAL
libxml2 2.13.8-r0 CVE-2025-49795 HIGH
libxml2 2.13.8-r0 CVE-2025-6021 HIGH
pcre2 10.43-r1 CVE-2025-58050 CRITICAL
golang.org/x/crypto v0.31.0 CVE-2025-22869 HIGH
golang.org/x/oauth2 v0.24.0 CVE-2025-22868 HIGH
stdlib 1.22.10 CVE-2025-47907 HIGH

Source Code Scan Results

🎉 No vulnerabilities found!

Copy link
Copy Markdown
Contributor

@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: 0

🧹 Nitpick comments (2)
src/Appwrite/Platform/Modules/Functions/Workers/Builds.php (2)

456-461: Use repo‑local git config and safer commit message quoting

Avoid 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

📥 Commits

Reviewing files that changed from the base of the PR and between ab7d3d3 and 5d5c1d8.

📒 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 commits

Using 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 passed

Confirmed 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.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Sep 22, 2025

✨ Benchmark results

  • Requests per second: 1,229
  • Requests with 200 status code: 221,277
  • P99 latency: 0.15803164

⚡ Benchmark Comparison

Metric This PR Latest version
RPS 1,229 1,025
200 221,277 184,618
P99 0.15803164 0.185594731

@Meldiron Meldiron merged commit c38d319 into 1.8.x Oct 22, 2025
41 checks passed
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