Repository navigation
Conversation
Add `volcano git root-directory <path>` and `--reset`, which call
PUT /projects/{id}/git-connection/root-directory. It changes only the
directory the project builds from and accepts a project access token.
`volcano git connect --root-directory` on the repository already bound
now uses the same route instead of rebinding. With a project access
token, connect names the root-directory command.
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cf6c1b3648
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0177c6c7f0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
AI review: no P0-P2 findingsAdds Not checked: The AI review read the diff, the code, and the PR's text; it ran no tests or builds and read nothing outside this repository.
Human review: needed
The AI review found no P0-P2 problems at ded0c85, so the code needs no second review for bugs. Decide the points above: approve to accept them, or request changes. Suggested reviewer: |
|
@codex review |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
What
volcano git root-directory <path>changes the subdirectory the connected repository builds from. It leaves the repository and production branch alone.--resetbuilds from the repository root again.It calls Kong/volcano-hosting#2145's
PUT /projects/{id}/git-connection/root-directory, which accepts a project access token. That lets CI or an agent move a project within its repository, while connecting a different repository stays with a person.How
The command (
internal/cmd/git/root_directory.go):./apps/web/becomesapps/web.--reset. An empty or whitespace argument is refused, because that's what an unset variable in a script looks like.validateRootDirectory, now shared, which refuses an absolute path or one with...connect, it says what a push to the production branch deploys, which is nothing while auto-deploy is off.Errors, shown as the server gives them:
apps\..\..\outsideon Linux, where the CLI's check doesn't treat\as a separator) and 409 (source export or Git hand-over) readfailed to set the root directory: HTTP 4xx: <server message>.explainNotFound, which tells a project with nothing connected ("Connect one withvolcano git connect") from one that doesn't exist.gitconnect.Service.CanConnect, oneGET /user/git/connections). A503means the API has no GitHub App, as in local mode, and that becomes the reason given instead of advice to connect. A project access token can't read that route, so it skips the check.volcano git connect --root-directoryon the repository already bound, when only the root directory differs (same repository id, installation, name and production branch), now calls the new route instead of rebinding.PUT, which refreshes those.A project access token on
connectstill fails before any write, because resolving the repository reads the account's GitHub connections. So no CLI path reaches the connectPUT's new403. When--root-directoryis set on a connected project, the refusal now names the command that works with the token:Spec
openapi/openapi.yamlcarries #2145's spec as merged (b22c133cf): the new path,SetProjectGitRootDirectoryRequest, and the connectPUT's security and403text. The merged diff is identical to what was vendored, and every block it touches matches hostingmainverbatim. The client is regenerated.Tests
internal/cmd/git):--reset; a project access token; every argument refusal; the server's 400, 403 and 409 messages; nothing connected; nothing can be connected (503); a project token on a project with nothing connected skips that check; a missing project.--root-directorytoo; a moved default branch still rebinds; a project token gets the root-directory hint (with shell quoting and--reset); a root directory changed under the command is not overwritten.TestLocalModeE2ESmokegainsrequireLocalModeLeavesGitToTheCloud.volcano git root-directory apps/webat the local stack (its API URL, user token and project) and requires the "git provider integration is not configured … If this is local mode, that is expected" reason, with no "Connect one".localmode-e2ejob againstkong/volcano:local-nightly, and passed on this PR.TestCLIE2ESmokeGitRootDirectoryis in Kong/volcano-hosting#2161, based on main, on a branch named like this one so hosting's CLI lane builds this branch. It covers:../outsiderefusal;400forapps\..\..\outside;404;connectwith a project token refused for want of an account token.tests/e2e/apican't connect a repository: binding needs a GitHub App installation, which that suite doesn't have. Changing the root directory of a connected repository is covered by the unit tests here and by #2145's handler and service tests.make lint,go test ./...andmake openapi-generated-checkpass.Docs
docs/git.md:--root-directoryis the only way to change it.Follow-ups
volcano git production-branch:PUT …/production-branchhas the same gap (token-changeable, no CLI command).volcano gitreads the cloud login even where top-level resource commands run against the local stack. That's existing behavior, unchanged here.🤖 Generated with Claude Code