{"id":18459029,"url":"https://github.com/liatrio/gratibot","last_synced_at":"2025-04-08T05:34:50.839Z","repository":{"id":37051829,"uuid":"294891086","full_name":"liatrio/gratibot","owner":"liatrio","description":"Slack bot used to recognize one another’s accomplishments and give shoutouts","archived":false,"fork":false,"pushed_at":"2025-03-29T16:57:44.000Z","size":2359,"stargazers_count":13,"open_issues_count":37,"forks_count":0,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-03-29T17:33:31.311Z","etag":null,"topics":["app-mod-guild","botkit","slack"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/liatrio.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-12T07:11:50.000Z","updated_at":"2025-03-29T16:56:58.000Z","dependencies_parsed_at":"2023-10-20T21:34:23.297Z","dependency_job_id":"1fb909a5-493e-4f0f-808f-0bba5e9ae999","html_url":"https://github.com/liatrio/gratibot","commit_stats":null,"previous_names":[],"tags_count":77,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liatrio%2Fgratibot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liatrio%2Fgratibot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liatrio%2Fgratibot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liatrio%2Fgratibot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/liatrio","download_url":"https://codeload.github.com/liatrio/gratibot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247785919,"owners_count":20995641,"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":["app-mod-guild","botkit","slack"],"created_at":"2024-11-06T08:21:28.501Z","updated_at":"2025-04-08T05:34:45.823Z","avatar_url":"https://github.com/liatrio.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Gratibot\n\n[![Prod](https://github.com/liatrio/gratibot/actions/workflows/apply-prod.yml/badge.svg)](https://github.com/liatrio/gratibot/actions/workflows/apply-prod.yml)\n[![Release](https://github.com/liatrio/gratibot/actions/workflows/release.yml/badge.svg)](https://github.com/liatrio/gratibot/actions/workflows/release.yml)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/49996ee68b94348ee16b/test_coverage)](https://codeclimate.com/github/liatrio/gratibot/test_coverage)\n\nGratibot is a Slack bot for recognizing the accomplishments of friends and\ncolleagues. Read more in [Liatrio's blog post about Gratibot.](https://www.liatrio.com/blog/gratibot-chatbot)\n\n---\n\n### Roadmap\n\n- [x] Deploy on Azure\n- [ ] Implement Functional Testing\n- [ ] Refactor Logic to Service Module\n- [x] Redeem Fistbumps Through Gratibot\n- [x] Replace Botkit with Bolt\n\n---\n\n### Contributing\n\nGratibot leverages [Convential Commits](https://www.conventionalcommits.org/en/v1.0.0/)\nto drive version bumps and mantain a clean commit history. Things worth noting:\n\n- Commits will be linted locally to enforce valid conventional commits\n  - [husky](https://typicode.github.io/husky/#/)\n  - [commitlint](https://github.com/conventional-changelog/commitlint)\n- Releases will be published and maintained by [semantic-release](https://github.com/semantic-release/semantic-release)\n  - Preview your release locally with `npm run semantic-release --dry-run`(_You'll need a GITHUB_TOKEN_)\n\n---\n\n### Deployment\n\nGratibot is deployed in Liatrio's Azure environments using GitHub Actions and\nTerraform. After a change passes CI checks and is approved by reviewers, it can\nbe merged into main.\n\nCommits to main will kickoff the following steps:\n\n1. Build \u0026 Publish a new Docker image using the current Git ref as a tag\n2. Apply the new image and any infrastructure changes to our nonprod Azure subscription\n3. Upon manual review from maintainers, a new Release will be generated and published to GitHub\n\nNew GitHub Releases will trigger our workflow to deploy changes to our prod Azure subscription\n\n\n---\n\n### Local Development\n\nCreate a Slack app for running a development version of Gratibot:\n\n##### Create Your App\n\n\u003e When using Slack manifests you **cannot** use an old slack app. You will need to create a new one.\n\n1. Goto [api.slack.com/apps.](https://api.slack.com/apps)\n2. Click 'Create New App' and choose to create an app from an app manifest.\n3. Select the Slack workspace you'll run the bot in for development.\n4. Copy Gratibot's app manifest from `slack_app_manifest.yml`.\n5. Replace any occurences of `${botName}` with a name for your bot.\n    - If you're developing in a shared workspace, consider a name like `YOUR_NAME-gratibot`.\n    This will help others to identify who owns the bot.\n6. Finally, confirm that the configuration looks correct and click 'Create'\n\n##### Run Your Local Copy\n\n1. On the **Basic Information** tab under *Settings*, scroll down to\n'App-Level Tokens' and click the button to 'Generate Token and Scopes'.\nName your token 'websocket-token', and add the\nscope 'connections:write'. Generate the token. Copy the ***Token*** that is\ngenerated, we'll use it later for the bot's APP_TOKEN.\n2. Go to the **Install App** tab under *Settings*. Click the button to\ninstall the app to your workspace, and follow the provided prompts. After\ninstalling, copy the ***Bot User OAuth Token*** value, and save it for later.\n4. In your cloned copy of the repo, create a file called `.env`, it should look\nsomething like:\n    ```\n    APP_TOKEN=SECRET GOES HERE\n    BOT_USER_OAUTH_ACCESS_TOKEN=SECRET GOES HERE\n    ```\n    Replace the values after the equals sign with the values you saved before.\n    There is no need for quotes. ***Make sure to not share these values, and to\n    not publish them online such as by pushing them to GitHub.***\n\n5. Now that your secrets are configured, run your local copy\nof Gratibot with `docker-compose up --build`\n\nWith all of these steps complete, your bot should be running in the Slack\nworkspace you chose to develop for. You should now be ready to test your bot,\nand progress with development.\n\n[Bolt Docs](https://slack.dev/bolt-js/concepts)\n\n\n### Useful Mongo commands\n\nlist databases. `gratibot` is the database being used for this project.\n\n```\ndb.adminCommand( { listDatabases: 1 } )\n```\n\nswitch to `gratibot` db.\n\n```\nuse gratibot\n```\n\nlist collections (in the current db)\n\n```\ndb.getCollectionNames()\n```\n\nlist all items in a collections\n\n```\ndb.COLLECTION_NAME.find()\n```\n\nfind item in collection based on index value\n\n```\ndb.COLLECTION_NAME.find({KEY: VALUE})\n```\n\n### Utility Commands\n\nrun tests\n\n```\nnpm test\n```\n\nrun lint fix\n\n```\nnpm run lint-fix\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliatrio%2Fgratibot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliatrio%2Fgratibot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliatrio%2Fgratibot/lists"}