{"id":13609020,"url":"https://github.com/pcjl/mattermost-coffeebot","last_synced_at":"2025-04-12T17:33:37.203Z","repository":{"id":55607122,"uuid":"130370696","full_name":"pcjl/mattermost-coffeebot","owner":"pcjl","description":"☕  Mattermost bot that regularly pairs coworkers to get to know each other","archived":false,"fork":false,"pushed_at":"2021-01-11T15:13:52.000Z","size":11,"stargazers_count":16,"open_issues_count":7,"forks_count":10,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-07T14:42:39.496Z","etag":null,"topics":["bot","docker","mattermost","python"],"latest_commit_sha":null,"homepage":"","language":"Python","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/pcjl.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":"2018-04-20T14:07:56.000Z","updated_at":"2023-04-09T23:41:06.000Z","dependencies_parsed_at":"2022-08-15T04:20:10.398Z","dependency_job_id":null,"html_url":"https://github.com/pcjl/mattermost-coffeebot","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/pcjl%2Fmattermost-coffeebot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pcjl%2Fmattermost-coffeebot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pcjl%2Fmattermost-coffeebot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pcjl%2Fmattermost-coffeebot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pcjl","download_url":"https://codeload.github.com/pcjl/mattermost-coffeebot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248605492,"owners_count":21132178,"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":["bot","docker","mattermost","python"],"created_at":"2024-08-01T19:01:31.808Z","updated_at":"2025-04-12T17:33:32.195Z","avatar_url":"https://github.com/pcjl.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Mattermost Coffeebot\n\n*Mattermost Coffeebot* is a bot written in Python that interacts with the [Mattermost API](https://api.mattermost.com/) using [`mattermostdriver`](https://github.com/Vaelor/python-mattermost-driver) and pairs users in your Mattermost team on a regular basis to meet each other.\n\nThe bot will take users within a specific channel and message random pairs to meet up. The channel and frequency of these pairings can be configured.\n\n### Features\n\n- Written in Python\n- Uses the [Mattermost API](https://api.mattermost.com/)\n- Automatically pairs Mattermost users\n- Uses past pairing data to pair people with people they have not been paired with before\n- Configurable pairing times (by modifying cronjob)\n\n### Future Features\n\n- Follow-ups to make sure paired users actually met\n- Better deployment process (deployment script)\n\n### Technologies Used\n\n- Python 3.4+\n- SQLite\n- Docker\n\n### Deployment\n\nAs of right now, the project is deployed by manually cloning the repository onto a server (such as an AWS EC2 instance), installing the dependencies, creating the environment variables, and setting up a cronjob.\n\nThe database is only used for storing previous pairings in order to increase the probability of pairing each user with another user they haven't been paired with before. Should the database be lost, any previous data will be gone, but the bot will still function, just without any data on previous pairings.\n\nDue to this, if you do use SQLite for your database, it is not ideal to use the Docker container on production because your database will be gone if your container gets stopped. However, theoretically, if you use a database hosted on a separate server or on RDS, it should be safe to use the Docker container.\n\nHere are the current steps to deploying:\n\n1. Clone the repository into a directory\n\n2. Install Python 3.4+, `pip`, and `cron`.\n    - On Ubuntu, this can be done by running `sudo apt-get update \u0026\u0026 apt-get install -y -qq cron python3 python3-pip`\n\n3. Install the Python packages by running `sudo pip3 install -r requirements.txt` in the directory\n\n4. Create a `.env` file in the directory with all of your credentials/settings following the same format as the `example.env` file supplied\n\n5. Set up a cronjob with your frequency following the same format as the `example.crontab` file supplied\n    - This can be done by running `crontab -e` and adding the cronjob there\n\n### Development\n\nIn order to set up a local development environment:\n\n*This assumes that you already have Docker installed*\n\n1. Clone the repository into a directory\n\n2. Create a `.env` file in the directory with all of your credentials/settings following the same format as the `example.env` file supplied\n\n3. Create a `crontab` file in the directory with your frequency following the same format as the `example.crontab` file supplied\n\n3. Build the Docker image by running `docker-compose build`\n\n4. Create the Docker container by running `docker-compose up`\n\n5. Run `bash` in the container by running `docker exec -ti \u003cCONTAINERID\u003e bash`\n\n6. Run the command `pair` (or allow the cronjob that was set up to run it)\n\nIf you make any changes to the bot, you will have to rebuild the Docker image to apply the changes.\n\n### License\n\n```\nMIT License\n\nCopyright (c) 2018 Patrick Liu\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpcjl%2Fmattermost-coffeebot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpcjl%2Fmattermost-coffeebot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpcjl%2Fmattermost-coffeebot/lists"}