1.0.4 • Published 2 years ago

commit-to-timesheet-log v1.0.4

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

commit-to-timesheet-log

Automate your timesheet with git commits

Commit-to-timesheet-log is a npm package to modify the github hooks in your project to automate your timesheet updation based on your git commits.

Installation

Install commit-to-timesheet-log globally.

Usage

npm i -g commit-to-timesheet-log

Run the command "setup-commit-to-time-sheet" in the root level of your git project and enter your geekyants email.

setup-commit-to-time-sheet

Based on the email entered it will create a personalised commit-msg hook in .git/hooks folder of your project.

commit syntax to log timesheet

git commit -am “[Log - {HRS}] [TICKET-ID: {JIRA_PROJECT_CODE-Ticket_ID}] : {COMMIT_MESSAGE}”

Example: git commit -am “Log - 4 : Facebook login implemented”

The above example command will log your "4 hours" of work for today in GeekyAnts portal with the description as "Facebook login implemented".

Assumptions

At this time the timesheet api is not available so i created a "mock-timesheet-server" to mock the behaviour provided i.e

  • Success response: {”success”: true, “errorMessage”: “”}
  • Error response: {”success”: false, “errorMessage”: “User doesn’t exist”}

And currently "venkatas@geekyants.com" is the only whitelisted email and for other emails the api will respond with the Error response.