Skip to content
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

Closed
wants to merge 8 commits into from
Closed

Added timing methods #157

wants to merge 8 commits into from

Conversation

johncongdon
Copy link

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.

@Zaxuhe
Copy link

Zaxuhe commented Sep 23, 2011

I like the idea (didn't check the code) but the ideas are quite nice, thanks!

@nvie
Copy link
Owner

nvie commented Nov 23, 2011

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.

@nvie nvie closed this Nov 23, 2011
@johncongdon
Copy link
Author

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.

@rwilcox
Copy link

rwilcox commented Nov 28, 2011

I +1 the idea of spawning these scripts off.

Perhaps git flow could have a hooks/callback mechanism - when you git flow feature start it calls .git/feature_start_callback.sh, which could call your scripts.

@nvie
Copy link
Owner

nvie commented Nov 28, 2011

@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.

@rwilcox
Copy link

rwilcox commented Dec 3, 2011

Moved callback discussion to #171

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.

4 participants