Asks how long you worked on a commit then logs that amount of time to the corresponding JIRA ticket. Feel free to log issues or send PRs. Here is the blog post if you'd like a walkthrough of the code or if you would like to leave comments, suggestions or share experiences.
- Steps
- Open your terminal and change directory to your github repository
cd my-github-repository
- Run this command to change your directory to your git hooks folder (you need the back ticks)
`git rev-parse --git-dir`/hooks
- Copy the git hook with this command
wget https://raw.githubusercontent.com/msolomonTMG/timesheet-githook/master/post-commit && chmod +x post-commit
- Be sure to change the JIRA url if you are not from my organization :)
- Open your terminal and change directory to your github repository
- When you commit on a branch that has a JIRA ticket in the name and you do not log time through a smart commit, a message will pop up asking how long that commit took to code.
- Answer the question in this format:
- 1d (for one day)
- 2h (for two hours)
- 30m (for thirty minutes)
- 1h 10m (for one hour and ten minutes)
- I welcome pull requests to make this better!
- I want an update to not show the message if the commit is a merge
- This stack overflow article seems like a good place to start for this