# ./tsheets.coffee
#
# Description:
# Simple TSheets reporting.
#
# Configuration:
# HUBOT_TSHEETS_API_CLIENT_TOKEN = <tsheets api token>
#
# Commands:
# tsheets report <jobcode name> <hours> [<date>] - Reports time for a specific job code
# tsheets list jobcodes - Lists all job codes available to use
# tsheets I am <tsheets user id> - Connects a TSheets user to the current Hubot user
# tsheets summary [<start date>] [<end date>] - Shows reports for all users between dates, defaults to current week
#
# Notes:
# Requires a TSheets account with API access:
# Planned to be implemented:
# hubot tsheets show mine <since time> - Shows reports for the current user
#
- Create a branch
- Write tests --> Implement your functionality --> Repeat
- Make a pull request
Required environment variables
HUBOT_TSHEETS_API_CLIENT_TOKEN
- API token for the TSheets API
Optional environment variables
TEST_HUBOT_TSHEETS_USER_ID
- TSheets user ID to report time forTEST_HUBOT_TSHEETS_JOBCODE_ID
- TSheets jobcode ID to use when reporting time
Example
$ HUBOT_TSHEETS_API_CLIENT_TOKEN="super-secret" \
TEST_HUBOT_TSHEETS_USER_ID=123 \
TEST_HUBOT_TSHEETS_JOBCODE_ID=456 \
npm test
MIT