https://github.com/springload/slack-harvest
Integrations between slack and harvest, such as the timesheet nagger.
https://github.com/springload/slack-harvest
harvest slack
Last synced: 11 months ago
JSON representation
Integrations between slack and harvest, such as the timesheet nagger.
- Host: GitHub
- URL: https://github.com/springload/slack-harvest
- Owner: springload
- Created: 2015-06-16T13:46:05.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-12-07T19:01:36.000Z (about 9 years ago)
- Last Synced: 2025-02-01T06:25:39.521Z (about 1 year ago)
- Topics: harvest, slack
- Language: JavaScript
- Size: 11.7 KB
- Stars: 4
- Watchers: 25
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Harvester
Plumbing between Slack and Harvest with node.js
Right now, it runs a bot to generate a message asking users to do their timesheets.
The bot options can be configured in `config/default.json`. You'll need a webhook
URL, which you can get from `https://[account].slack.com/services/`.
You'll also need Harvest API credentials (store them safely away from git/GitHub, eg. in a password manager).
### TODO
* [ ] Get Public Holidays from an API and respect them.
* [ ] Humanise the message some more "tom, dick __and__ harry"
* [ ] Handle leave, other calendar events with a nice integration?
## Installation
```bash
npm install
```
You'll need to copy the example config JSON file:
```
npm run config
```
## Running the app in development
Harvester uses nodemon for development.
```bash
npm start
```
To bug users on, just `curl` the URLs:
```bash
curl http://localhost:3000/timesheets-plz/
curl http://localhost:3000/percentage-plz/
```
There's also a scheduler via `node-schedule` that automatically runs at
6pm on weekdays.
## Production
Put the app on an internal server. It doesn't need to be
accessible by the general public, no need for a reverse proxy set up.
```bash
curl http://10.0.0.10:3444/timesheets-plz/
curl http://10.0.0.10:3444/percentage-plz/
```
Harvester relies on the fantastic PM2 library in production.
Install it on your server with:
```bash
npm install pm2 -g
```
Start the application (with baked-in Babel support!) via:
```bash
# Start all apps
$ pm2 start processes.json
# Stop
$ pm2 stop processes.json
# Restart
$ pm2 start processes.json
## Or
$ pm2 restart processes.json
# Reload
$ pm2 reload processes.json
# Graceful Reload
$ pm2 gracefulReload processes.json
# Delete from PM2
$ pm2 delete processes.json
```