Skip to content

Conversation

@peterHoburg
Copy link

@peterHoburg peterHoburg commented Nov 4, 2025

Added the ability to set SPECIFY_USE_CURRENT_BRANCH=1 to have speckit use your current branch for specs instead of making a new one.

This is extremely useful for teams that already have their own way of branching, and don't want to have more branches get created for no reason.

I have gone through and tested the full flow on MacOS.

Closes #1104

Some of the code was edited by Claude Code.

Copilot AI review requested due to automatic review settings November 4, 2025 18:51
@peterHoburg peterHoburg requested a review from localden as a code owner November 4, 2025 18:51
@peterHoburg peterHoburg mentioned this pull request Nov 4, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a new SPECIFY_USE_CURRENT_BRANCH environment variable that allows users to work with existing git branches that don't follow the ###-name convention. When set, the scripts will use the current git branch name instead of creating a new feature branch.

  • Adds SPECIFY_USE_CURRENT_BRANCH environment variable support across bash and PowerShell scripts
  • Updates branch detection logic to respect the new variable while maintaining priority chain
  • Skips branch pattern validation when using current branch mode

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
scripts/powershell/create-new-feature.ps1 Adds logic to use current branch instead of creating new one when env var is set
scripts/powershell/common.ps1 Integrates env var into branch detection and validation functions
scripts/bash/create-new-feature.sh Mirrors PowerShell changes for bash environment
scripts/bash/common.sh Adds env var support to bash common functions
README.md Documents the new environment variable in configuration table
CHANGELOG.md Records the new feature addition with examples
AGENTS.md Documents environment variables section with the new option

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@josephcrawfordSRH
Copy link

Thanks for adding this, I have been waiting for something like this to be released into spec-kit.

Copilot AI review requested due to automatic review settings November 4, 2025 21:07
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings November 4, 2025 21:35
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

@yannicklin yannicklin left a comment

Choose a reason for hiding this comment

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

I cannot find obvious issue. The comments made by CoPilots seems not useful.

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.

Add ability to use current branch for specify feature name and dir

3 participants