Serhioromano / vscode-gitflow

Git Flow extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=Serhioromano.vscode-gitflow
MIT License
42 stars 9 forks source link

Finish a branch which creates a tag #20

Closed K-Ko closed 2 years ago

K-Ko commented 2 years ago

Feature request

As is

At the moment a fixed tag message is used and in the dropdown on finishing a branch the -m option is not available.

image

If I put there some text, e.g. "Feature release" it is ignored and a fixed message "Finish ..." is generated:

image

(Did not checked yet what happen if I provide there a -m "My message", may be it will accepted?)

Serhioromano commented 2 years ago

No. It will not work if you put there -m. I'll see if that can be done.bthis 8s quick pick and it returns array of preset elements. I can add another input box to enter message and prefill it. What do you think?

K-Ko commented 2 years ago

Prefill with Finish release/hotfix ... is ok as default, I use the tag mostly to "communicate" and remember :-) a short summary of last change.

Serhioromano commented 2 years ago

Release 1.2.0 now allow you to enter message. Although I do not see where it appears. It is still an automatic message about a merge. But to pass message to gitflow is all I can do from my side.

K-Ko commented 2 years ago

I mean not the commit message, I mean the tag message.

The merge messages are fine: image

But the tag becomes the "automatic" message: image

Serhioromano commented 2 years ago

This is what I say. I pass -m parameter to git flow release finish. It is there, because this command create a tag. But somehow it is not in the tree later. I do not know why. May be to report to git flow AVH project.

K-Ko commented 2 years ago

This is still fine: image

But the finish command is executed with "undefined" message

INFO: [Run command] gitflow.finishHotfix
INFO: [Run command] gitflow.refreshT
INFO: [git flow hotfix finish  -m"undefined" -T "0.34.1" 0.34.1 ] Your branch is ahead of 'origin/master' by 4 commits.

image

Serhioromano commented 2 years ago

I could not reproduce it. But I created a patch anyway try new 1.2.5. Also do not forget to relead VSC after update.

K-Ko commented 2 years ago

Made some test in a new repo.

Feature

INFO: [Run command] gitflow.newFeature
INFO: [git flow feature start  test ] 

image

INFO: [Run command] gitflow.finishFeature
INFO: [git flow feature finish  test ] Already up to date.

Works also on ESC in popup and the finish is not canceled!

Test release

without package.json yet

INFO: [Run command] gitflow.newRelease
INFO: [Run command] gitflow.refreshT
INFO: [git flow release start  0.1.0 ] 

Add package.json now Give a message image BUT if I then press ESC and also in the next pop (with the parameters) the release happens with -m "undefined"

INFO: [Run command] gitflow.finishRelease
INFO: [Run command] gitflow.refreshT
INFO: [git flow release finish  -m"undefined" -T "0.1.0" 0.1.0 ] Merge made by the 'ort' strategy.
 package.json | 3 +++
 1 file changed, 3 insertions(+)
 create mode 100644 package.json
Merge made by the 'ort' strategy.
 package.json | 3 +++
 1 file changed, 3 insertions(+)
 create mode 100644 package.json
Deleted branch release/0.1.0 (was 231e849).

So after the ESC in the message popup the release will not canceled.

Another release

INFO: [Run command] gitflow.newRelease
INFO: [git add ./package.json] 
INFO: [git commit ./package.json -m"Version bump"] [develop 4e9e63f] Version bump
 1 file changed, 1 insertion(+), 1 deletion(-)

INFO: [Run command] gitflow.refreshT
INFO: [git flow release start  0.2.0 ] 
Summary of actions:
- A new branch 'release/0.2.0' was created, based on 'develop'
- You are now on branch 'release/0.2.0'

But this is not correct from my point of view. The version bump must be done in the release branch, not in develop! Develop MUST stay on the "old" version, only the release branch may have the new version.

Assume this: the release will not approved and therefore canceled. No problem, branch just can be deleted and recreated later. But develop has the version bump, not good if I publish the develop branch!

So I think just swap the logic

The new "version" is only really active/valid after release finish.

Imagine start a new feature

INFO: [Run command] gitflow.newFeature
INFO: [git flow feature start  test-3 ] 
Summary of actions:
- A new branch 'feature/test-3' was created, based on 'develop'
- You are now on branch 'feature/test-3'

It contains the "wrong" package.json

The ESC button is mostly on finish actions not handled correct!

Serhioromano commented 2 years ago

Pin it for Monday. Too late already.

Serhioromano commented 2 years ago

Version 1.2.8 fixes

Once again, thank you for finding time to go through those bugs and describe them in so detailed. I very appreciate it.

Serhioromano commented 2 years ago

Although your experience with this extension is not as good as it could be, I would still appreciate if you rate this extension in marketplace.

K-Ko commented 2 years ago

Perfect, v1.2.9 works as expected :-)

image