Add handling for Vercel apps to exclude entire branches #904
Open
Add handling for Vercel apps to exclude entire branches #904
Conversation
…nt. Ref #239. Entire-Checkpoint: 07ed1bd20d95
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Vercel-aware behavior to the setup/configure flows so Entire can optionally disable Vercel preview deployments for entire/* branches by updating vercel.json, with accompanying unit tests.
Changes:
- Introduces
maybePromptVercelDeploymentDisableto detect Vercel projects and optionally writegit.deploymentEnabled["entire/*"]=falseintovercel.json. - Wires the Vercel prompt into interactive enable, non-interactive setup, and agent-management change flows after hooks are installed.
- Adds tests covering merge-with-existing-config, create-new-config, and “already disabled” no-op behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| cmd/entire/cli/setup.go | Adds Vercel detection + prompt logic and integrates it into setup/configure flows. |
| cmd/entire/cli/setup_test.go | Adds unit tests for the new Vercel prompt/config-merge behavior. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…d mergeVercelDeploymentDisabled error Agent-Logs-Url: https://github.com/entireio/cli/sessions/59ca634c-4da4-40b7-b97b-2310258df3de Co-authored-by: ashtom <70720+ashtom@users.noreply.github.com>
Entire-Checkpoint: 7bef5f131260
Entire-Checkpoint: fa130c2eaf90
Entire-Checkpoint: 76266a8be480
Entire-Checkpoint: 0e2e251e0fb6
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Entire-Checkpoint: edc71619cd07
Entire-Checkpoint: 5ce40f70db17
Entire-Checkpoint: 861a905efc98
Entire-Checkpoint: 67f984a929c7
Entire-Checkpoint: 8e99c2e7a6e4
Entire-Checkpoint: d9ab43f35155
Entire-Checkpoint: 854db522b3c2
Member
Author
|
@copilot resolve the merge conflicts in this pull request |
# Conflicts: # cmd/entire/cli/setup.go # cmd/entire/cli/setup_test.go Co-authored-by: ashtom <70720+ashtom@users.noreply.github.com>
Contributor
Resolved in 60d2bb7. The two conflicts were in |
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.
This pull request introduces support for managing Vercel deployment settings within the repository's metadata branch, based on a new
vercelfield in project settings. When enabled, the CLI automatically writes or merges avercel.jsonfile to disable deployments for Entire-managed branches. The change includes updates to the checkpoint logic, settings management, and setup flows, as well as comprehensive tests for the new behavior.Vercel deployment management integration:
Vercelboolean field toEntireSettingsand updated settings loading/merging logic to recognize and merge this field from both main and local settings files. Also introduced aLoadFromRepoRoothelper for context-aware settings loading. [1] [2] [3] [4] [5] [6]maybeMergeVercelConfiginGitStoreto ensure that whenvercelis enabled, avercel.jsonfile is written or merged on the metadata branch to disable deployments for Entire branches. This is invoked during branch/session initialization and committed checkpoint updates. [1] [2] [3] [4]Checkpoint and session logic improvements:
ensureSessionsBranchto accept acontext.Contextparameter for consistency and future extensibility. [1] [2] [3] [4] [5] [6] [7] [8]Setup and agent management flow:
Dependency and import updates:
These changes ensure that repositories using Vercel can safely prevent unwanted deployments from metadata branches managed by Entire, with configuration driven by project settings and integrated into the CLI's workflow.This pull request enhances the CLI setup process for projects using Vercel by adding logic to detect Vercel configuration and prompt users to disable deployments for
entire/**branches as reported in #239. It also introduces comprehensive tests to ensure this behavior works as intended. The changes are primarily focused on improving integration with Vercel and maintaining user control over deployment settings.Vercel integration and deployment control:
maybePromptVercelDeploymentDisable, which detects Vercel configuration files and prompts the user to optionally disable deployments forentire/**branches by updatingvercel.json. This function ensures that existing configuration is preserved and only the relevant deployment setting is changed.runEnableInteractive,applyAgentChanges,setupAgentHooksNonInteractive) to callmaybePromptVercelDeploymentDisableafter agent hooks are installed, ensuring users are prompted at the correct time. [1] [2] [3] [4]entire/**as a constant for consistent use across the codebase.Testing improvements:
setup_test.goto verify that the Vercel deployment disable prompt merges with existing config, creates config when needed, and skips prompting if already disabled. These tests ensure reliability and correct behavior of the new logic.Dependency and import updates:
"encoding/json"import to support reading and writingvercel.jsonfiles.Entire