Skip to content

Commit

Permalink
Merge branch 'release/1.3.11' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Serhioromano committed Jun 12, 2022
2 parents 6a0f908 + d24808a commit b576578
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to the "gitflow" extension will be documented in this file.

## [1.3.11] 06/12/2022

- enhance - Branch name creation now is checked through `git check-ref-format --branch ***` with allows create any qualified branch name.

## [1.3.10] 05/25/2022

- add - Option to automatically bump version on release or not.
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ GitHub CLI will automatically store your Git credentials for you when you choose

## Changelog

- 1.3.10
- 1.3.11
- enhance - Branch name creation now is checked through `git check-ref-format --branch ***` with allows create any qualified branch name.
- add - Option to automatically bump version on release or not.
- add - replace spaces in branch name with `_`
- fix - tmp dir for message files on release and hotfix
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vscode-gitflow",
"displayName": "Git Flow",
"description": "Git-Flow support for VS Code",
"version": "1.3.10",
"version": "1.3.11",
"engines": {
"vscode": "^1.64.0"
},
Expand Down
8 changes: 5 additions & 3 deletions src/ViewBranches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -307,15 +307,17 @@ export class TreeViewBranches implements vscode.TreeDataProvider<Flow> {
}

name = await vscode.window.showInputBox({
title: `Enter ${ucf(feature)} name [a-zA-Z0-9_-.]*`,
title: `Enter a valid ${ucf(feature)} git branch name`,
value: version,
});
if (name === undefined) {
return;
}
name = name.replace(/\s/igm, "_");
if (name?.match(/^([a-zA-Z0-9\_\-\.]*)$/) === null) {
vscode.window.showErrorMessage(`${feature} name have to match [a-zA-Z0-9_\\-\\.]*`);
const checked = this.util.execSync(`git check-ref-format --branch ${name}`).trim();

if (checked !== name) {
vscode.window.showErrorMessage(`Error creating a branch: ${checked}`);
return;
}

Expand Down

0 comments on commit b576578

Please sign in to comment.