Repository navigation
fix: honour console URL scheme in VCS commit statuses and authorize link - #13476
Merged
Merged
Conversation
The VCS PR comment's build-log links already respected
_APP_CONSOLE_URL_SCHEME, but the commit-status target URLs and the
external-contributor authorize link did not, so on a root-scheme install
they pointed at the legacy /console/project-{region}-{id} paths while the
comment pointed at /projects/{id}.
Gate all three on the same flag, and let GitAction read the hostname from
the platform config it already receives instead of re-resolving
_APP_CONSOLE_DOMAIN.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Contributor
Greptile SummaryThis PR updates VCS-generated console links to honor
Confidence Score: 5/5The PR appears safe to merge with no outstanding findings. The URL branches consistently preserve legacy behavior while producing the documented root-scheme paths, and the previous testing suggestion was manually resolved. Important Files Changed
Reviews (2): Last reviewed commit: "Merge branch 'main' into fix-vcs-comment..." | Re-trigger Greptile |
✨ Benchmark resultsComparing
Per-scenario breakdown & investigation detailsMetrics below reflect the current branch (after). Δ P95 compares against the base.
Top API waits (after)
|
2 of 4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
The VCS PR comment's build-log links already respected
_APP_CONSOLE_URL_SCHEME, but two other links generated for the same pull request did not:GitAction.php, and the "Starting..." status inGitHub/Deployment.php)GitHub/Deployment.php)Both were hardcoded to the legacy
/console/project-{region}-{projectId}/...form. On a root-scheme install that meant a single PR carried contradictory links — the comment's "View Logs" pointed at/projects/{id}/...while the commit status next to it pointed at/console/project-....All three now branch on the same flag.
GitActionalso reads the hostname from the$platformconfig it already receives, instead of re-resolving_APP_CONSOLE_DOMAIN/_APP_DOMAINitself.Resulting URLs under
_APP_CONSOLE_URL_SCHEME=root/projects/{projectId}/sites/{siteId}/projects/{projectId}/functions/{functionId}/projects/{projectId}/sites/{siteId}/deployments/{deploymentId}/projects/{projectId}/functions/{functionId}/deployments/{deploymentId}/git/authorize-contributor?…The
legacybranch is unchanged, so existing installs keep their current links.Deployment note
Cloud does not currently set
_APP_CONSOLE_URL_SCHEME, so production and staging default tolegacyand are unaffected by this PR. Moving them to the new console needs_APP_CONSOLE_URL_SCHEME=rootplus the matching_APP_CONSOLE_DOMAIN(appwrite.io/staging.appwrite.io) in cloud-applications.Not changed here, but worth noting: the QR link (
/v1/avatars/qr) and the comment's status icons (/images/vcs/*) are also built on the console hostname. They are served by the Appwrite container, so that hostname has to route them to the API and not only to the console app.Test Plan
composer linton both changed files — passedcomposer analyze(PHPStan level 4) on both changed files — no errorstests/unit/Vcs/CommentTest.php— 4/4 passingRelated PRs and Issues
n/a
Have you read the Contributing Guidelines on issues?
Yes
🤖 Generated with Claude Code