-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added timing methods #157
Added timing methods #157
Conversation
I like the idea (didn't check the code) but the ideas are quite nice, thanks! |
I don't really see this as something that should be in gitflow. Its use is too specific. If you want this, you should use your own scripts and wrap gitflow inside them, I think. |
ok, I didn't see them as specific. I think most developers would like to know that they spent X hours on a feature. But I definitely respect your opinion. My scripts are still not 100% anyway. I was putting some code out there in hopes that others could improve upon it. |
I +1 the idea of spawning these scripts off. Perhaps git flow could have a hooks/callback mechanism - when you |
@rwilcox: I like the idea of callbacks. This has been playing around in my head for a long time, since it would be ideal to auto-bump version numbers upon starting release branches, for example. But there are many more hooks you could think of, and I think @johncongdon's is one of them. If you have a suggestion or an implementation idea, please make sure to start the discussion (for example, in a separate issue). We could see how that takes us further. |
Moved callback discussion to #171 |
Hi,
This is my first pull request, so I hope I am doing it correctly. I am hoping you can take my core idea to the next level. As I am not much of a shell scripter, I did my best.
Just wanted to get your thoughts on my direction and see if you had any ideas to improve upon my implementation.
My thought was to add timing so that gitflow will track how much time is spent on each feature/hotfix/release/etc....
All records are stored in .gitflowTiming
TIMESTAMP ACTION TYPE READABLEDATE BRANCH
ACTION would be START, PAUSE(When switching branches), FINISH
TYPE would be FEATURE, HOTFIX ETC <---probably not needed
Also added (git flow develop), which switches you back to the develop branch while pausing the branch you are on.
To Be Done: Automatically calculate time spent and put into the comment. Started down the AWK trail, but haven't gotten back to it.
awk 'BEGIN{total=0;}/feature/test/ { if ($2=="START") start=$1; if ($2=="UNPAUSE") start=$1; if
($2=="PAUSE") total+=$1-start; if ($2=="FINISH") total+=$1-start;} END{print "total"; print total;}' .gitflowTiming
Seems to work correctly.