Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 11, 2025

Align Capistrano deployment configuration with new branching structure: production deploys from stable, demo deploys from main with override capability.

Changes:

  • config/deploy/production.rb: Deploy from stable branch (was production)
  • config/deploy/demo.rb: Deploy from main by default, allow override via BRANCH env var (was demo)

Usage:

# Production deploys from stable
cap production deploy

# Demo deploys from main by default
cap demo deploy

# Demo can deploy from any branch
cap demo deploy BRANCH=feature/my-feature
Original prompt

Update Capistrano deployment scripts to follow the new branching structure per team policy:

  1. The production environment must deploy from the "stable" branch instead of "production".
  2. The demo environment should deploy from the "main" branch by default but allow the branch to be overridden by a command-line argument.

Specifically:

  • In config/deploy/production.rb, set the deploy branch to 'stable' (was 'production').
  • In config/deploy/demo.rb, set the deploy branch to 'main' by default, but allow this to be overridden by explicitly passing a branch name via the Capistrano command line (e.g., cap demo deploy BRANCH=feature/my-feature).

No changes should be made to the deploy logic for other environments.

This pull request was created as a result of the following prompt from Copilot chat.

Update Capistrano deployment scripts to follow the new branching structure per team policy:

  1. The production environment must deploy from the "stable" branch instead of "production".
  2. The demo environment should deploy from the "main" branch by default but allow the branch to be overridden by a command-line argument.

Specifically:

  • In config/deploy/production.rb, set the deploy branch to 'stable' (was 'production').
  • In config/deploy/demo.rb, set the deploy branch to 'main' by default, but allow this to be overridden by explicitly passing a branch name via the Capistrano command line (e.g., cap demo deploy BRANCH=feature/my-feature).

No changes should be made to the deploy logic for other environments.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Update Capistrano deployment scripts for new branching structure Update Capistrano deployment branches to stable/main per team policy Dec 11, 2025
Copilot AI requested a review from srbbins December 11, 2025 22:18
@srbbins srbbins marked this pull request as ready for review December 11, 2025 22:22
Copy link
Contributor

@srbbins srbbins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pull request should commit into main, rather than develop.

Copy link
Contributor Author

Copilot AI commented Dec 11, 2025

This pull request should commit into main, rather than develop.

The target branch for this PR needs to be changed in the GitHub UI - I don't have the ability to modify PR target branches through the git CLI. The changes in this branch (commits 2baa829 and 4cb03c8) are compatible with either main or develop, as they only modify Capistrano configuration files.

Copilot AI requested a review from srbbins December 11, 2025 22:29
@srbbins
Copy link
Contributor

srbbins commented Dec 11, 2025

@copilot Ok how do I change the target branch in the UI?

Copy link
Contributor Author

Copilot AI commented Dec 11, 2025

@copilot Ok how do I change the target branch in the UI?

In the GitHub PR page, look for the branch information near the top (shows "base: develop" or similar). Click the "Edit" button next to it, then select "main" as the new base branch from the dropdown. GitHub will automatically rebase the PR to target main instead of develop.

@srbbins srbbins changed the base branch from develop to main December 11, 2025 22:38
@srbbins srbbins merged commit f934e23 into main Dec 11, 2025
1 of 5 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