File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,7 +28,10 @@ eval "$_paths_output"
2828unset _paths_output
2929
3030# Validate branch
31- check_feature_branch " $CURRENT_BRANCH " " $HAS_GIT " || exit 1
31+ # If feature.json pins an existing feature directory, branch naming is not required.
32+ if ! feature_json_matches_feature_dir " $REPO_ROOT " " $FEATURE_DIR " ; then
33+ check_feature_branch " $CURRENT_BRANCH " " $HAS_GIT " || exit 1
34+ fi
3235
3336# Validate prerequisites
3437if [[ ! -d " $FEATURE_DIR " ]]; then
Original file line number Diff line number Diff line change @@ -19,8 +19,11 @@ if ($Help) {
1919# Get feature paths and validate branch
2020$paths = Get-FeaturePathsEnv
2121
22- if (-not (Test-FeatureBranch - Branch $paths.CURRENT_BRANCH - HasGit:$paths.HAS_GIT )) {
23- exit 1
22+ # If feature.json pins an existing feature directory, branch naming is not required.
23+ if (-not (Test-FeatureJsonMatchesFeatureDir - RepoRoot $paths.REPO_ROOT - ActiveFeatureDir $paths.FEATURE_DIR )) {
24+ if (-not (Test-FeatureBranch - Branch $paths.CURRENT_BRANCH - HasGit $paths.HAS_GIT )) {
25+ exit 1
26+ }
2427}
2528
2629# Validate prerequisites
You can’t perform that action at this time.
0 commit comments