{"id":20224826,"url":"https://github.com/githubocto/good-day-bot","last_synced_at":"2025-10-11T05:16:23.717Z","repository":{"id":51331127,"uuid":"363984263","full_name":"githubocto/good-day-bot","owner":"githubocto","description":"Good Day is a Slack bot that helps developers keep track of how their days went.","archived":false,"fork":false,"pushed_at":"2025-03-08T03:59:29.000Z","size":2165,"stargazers_count":23,"open_issues_count":1,"forks_count":4,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-04-07T01:09:46.464Z","etag":null,"topics":["good-day","slack"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/githubocto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-05-03T15:59:00.000Z","updated_at":"2024-10-12T20:35:26.000Z","dependencies_parsed_at":"2022-08-26T10:41:59.065Z","dependency_job_id":null,"html_url":"https://github.com/githubocto/good-day-bot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/githubocto%2Fgood-day-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/githubocto%2Fgood-day-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/githubocto%2Fgood-day-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/githubocto%2Fgood-day-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/githubocto","download_url":"https://codeload.github.com/githubocto/good-day-bot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248252741,"owners_count":21072703,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["good-day","slack"],"created_at":"2024-11-14T07:09:19.067Z","updated_at":"2025-10-11T05:16:18.682Z","avatar_url":"https://github.com/githubocto.png","language":"TypeScript","readme":"# Good Day Slack Bot\n\nGood Day is a Slack bot that pings users every day and asks how their day was. It saves the results in a GitHub repository of the user's choice, within a `good-day.csv` file in the repo. Check out this [sample repo](https://github.com/githubocto/good-day-demo) for a preview of what yours could look like. \n\n\u003cimg src=\"assets/form.png\" alt=\"drawing\" width=\"500\"/\u003e\n\nIt also provides a series of visualizations to help users understand their data over time.\n\n\u003cimg src=\"assets/visualization.png\" alt=\"drawing\" width=\"500\"/\u003e\n\n## How it Works\n\n\u003cimg src=\"assets/diagram.png\" alt=\"drawing\"/\u003e\n\n### Slack App Express server\n\nThe repo contains the code for the core Good Day Slack bot, which is a Slack server that performs a few functions:\n\n1. Stores a user's GitHub repo and time preference in a database by collecting info from the Slack app home panel.\n2. Messages a user every day on the time they have specified with a new Good Day form.\n3. Stores user's daily data into a `good-day.csv` file in the repo of their choice.\n4. Messages a user every week when new visualization charts have been generated from their data.\n\n**⚠️ A note about privacy ⚠️**\n\nOnce a user creates a GitHub repository they have to invite the `good-day-bot` [GitHub user](https://github.com/good-day-bot) as a collaborator to the repo. This GitHub account (and by extension this Slack app) has write access to ___only this one particular user repo___. This means we are NOT asking for or storing any GitHub user authentication data.\n\n\n### Azure functions\n\nThis Slack Bot depends on two Azure functions: [https://github.com/githubocto/good-day-azure](https://github.com/githubocto/good-day-azure)\n\n1. **Timed Notify**: This function runs every hour, checks the database for users who need a new form, and hits an endpoint on the express server to trigger a new Good Day form for users daily.\n2. **Generate Charts**: This function runs every week and generates visualization charts for users in their GitHub repos. It also hits an endpoint on the express server to notify users new charts are ready.\n\n## Development\n\n### Local setup\n\n1. Install ngrok and authenticate\n\n2. Create a `.env` file with:\n\n```\nGH_API_KEY=\nSLACK_SIGNING_SECRET=\nSLACK_BOT_TOKEN=\nPG_CONN_STRING=\nAZURE_FUNCTIONS_ID= # API Key ID for azure functions\nAZURE_FUNCTIONS_SECRET= # API Key secret for azure functions\n```\n\n3. Start the server and ngrok\n\n`yarn install`\n\n`yarn dev`\n\nIn a new tab: `ngrok http 3000 --hostname octo-devex.ngrok.io`\n\n### Slack app configuration\n\n1. Enable interactivity and change the endpoint for interactive messages at: [interactivity and shortcuts](https://api.slack.com/apps/A0212TEULJU/interactive-messages?) to `https://octo-devex.ngrok.io/interactive`\n\n2. Enable events and change the endpoint for events at: [event subscriptions](https://api.slack.com/apps/A0212TEULJU/event-subscriptions?) to `https://octo-devex.ngrok.io/events`\n\n## Building / Releasing\n\n### Deployment\n\nDeployment to the production app happens automatically when pushing to main by using a GitHub Action specified in `.github/workflows/main_octo-good-day-bot.yaml`.\n\nOr use the [Azure App Service VS Code Extension](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azureappservice) for dev testing work.\n\n### Slack app configuration\n\n1. Enable interactivity and change the endpoint for interactive messages at: [interactivity and shortcuts](https://api.slack.com/apps/A0212TEULJU/interactive-messages?) to `PRODUCTION_URL/interactive`\n\n2. Enable events and change the endpoint for events at: [event subscriptions](https://api.slack.com/apps/A0212TEULJU/event-subscriptions?) to `PRODUCTION_URL/events`\n\n3. Add the following Bot Token Scopes at: [oauth and permissions](https://api.slack.com/apps/A0212TEULJU/oauth?) `chat:write`, `files:write`, `im:write`, `incoming-webhook`, `users:read`\n\n## License\n\n[MIT](LICENSE)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithubocto%2Fgood-day-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgithubocto%2Fgood-day-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithubocto%2Fgood-day-bot/lists"}