Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rozsival/oribot
đ Where's your worklog?
https://github.com/rozsival/oribot
Last synced: 1 day ago
JSON representation
đ Where's your worklog?
- Host: GitHub
- URL: https://github.com/rozsival/oribot
- Owner: rozsival
- Created: 2022-09-07T13:38:50.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-21T08:28:58.000Z (3 months ago)
- Last Synced: 2024-10-11T19:49:56.658Z (26 days ago)
- Language: TypeScript
- Homepage:
- Size: 1.52 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
OriBot
Simple Slack bot to annoy Oriflame teammates with regular worklog agenda.
## đž Installation
```bash
nvm use
yarn install
```## đ Deployment
This app is deployed to [Google Cloud Run](https://console.cloud.google.com/run/detail/europe-central2/oribot/)
via [Deploy action](.github/workflows/deploy.yml) on push to `main` branch.After each deployment two parallel processes are started with `yarn start`:
- app (`yarn start:app`) â bot worker that runs messaging schedule every day at specified time
- server (`yarn start:server`) â [public web](https://oribot-vpnvbwijja-lm.a.run.app) just for the funsiesTo save as many resources as possible, the Cloud Run instance auto-scales to 0 and idles when inactive. For this reason,
a [Cloud Scheduler job](https://console.cloud.google.com/cloudscheduler/jobs/edit/europe-central2/wakeup-oribot?project=apitree-oribot)
is created to wake OriBot up every day at 9:55 AM (Europe/Prague).> đ§ Do not forget to update the schedule based on the configuration below.
## âī¸ Configuration
The app uses `.env` config which is based on `.env.example`:
- `CHANNEL_ID` â Slack channel ID for messaging
- `ClOSURE_DAY` â day of month on which the worklog agenda closes (defaults to `25`)
- `DEBUG` â set `1` to disable sending messages and only output to console (defaults to `0`)
- `DEBUG_DATE` â when `DEBUG=1` use this to simulate a specific date for test run (defaults to `undefined`)
- `JOB_HOUR` â hour at which the messaging schedule runs daily (defaults to `10`)
- `JOB_MONTH_END` â month in which the messaging schedule ends (defaults to `11`)
- `JOB_MONTH_START` â month in which the messaging schedule starts (defaults to `2`)
- `PORT` â port on which the public web is served (defaults to `8080`)
- `TOKEN` â Slack [OAuth token](https://api.slack.com/apps/A0422H11QKS/oauth?) for ApiTree workspace
- `TZ` â timezone to be used for dates and times (defaults to `Europe/Prague`)> â ī¸ Values for `CHANNEL_ID` and `TOKEN` are mandatory and stored in
> the [Secret Manager](https://console.cloud.google.com/security/secret-manager?project=apitree-oribot).> âšī¸ Right click on channel name in Slack and use `View channel details` to find channel ID.
> đ By default, December and January are skipped in schedule due to end-of-year specific closure.