{"id":20643878,"url":"https://github.com/adjust/michaelbot","last_synced_at":"2026-04-17T13:02:48.119Z","repository":{"id":44934583,"uuid":"156186816","full_name":"adjust/michaelbot","owner":"adjust","description":null,"archived":false,"fork":false,"pushed_at":"2023-06-19T09:27:51.000Z","size":2076,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-01-17T09:11:54.663Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adjust.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":"2018-11-05T08:48:26.000Z","updated_at":"2021-12-14T11:03:30.000Z","dependencies_parsed_at":"2024-06-20T00:03:25.576Z","dependency_job_id":null,"html_url":"https://github.com/adjust/michaelbot","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adjust%2Fmichaelbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adjust%2Fmichaelbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adjust%2Fmichaelbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adjust%2Fmichaelbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adjust","download_url":"https://codeload.github.com/adjust/michaelbot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242705596,"owners_count":20172325,"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":[],"created_at":"2024-11-16T16:14:10.891Z","updated_at":"2026-04-17T13:02:48.114Z","avatar_url":"https://github.com/adjust.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Let's Get Ready To Rumble!](../master/docs/michael-buffer.jpg)\n\nMichael\n=======\n\n[![Build Status](https://travis-ci.org/andrewslotin/michael.svg?branch=master)](https://travis-ci.org/andrewslotin/michael)\n\nAnnounce deploys in Slack channels.\n\nSlack app: https://api.slack.com/apps/A08KWH8PJCC/general\n\nInstance Setup \n--------------\nThe instance is created on AWS backend account in region us-east-2 (Ohio). This instance has a public IP and is accessible through SSH using public/private key pairs. \n\nThe access is limited to Adjust VPN (Office) and New Bastion IPs. It is also possible to use EC2 Instance Connect from AWS Web Console. Security settings can be seen in Security Group (sg-0f4aaed99c0e4f992). \n\n![Security Group rules for EC2 Instance for Michaelbot](./docs/ec2-instance-sg-rules.png)\n\nThe web port open is 8081 and it can only be accessed through AWS Elastic Load Balancer (ALB) through https://adjust-michaelbot.de\n\nIt is also protected via AWS Web Application Firewall (WAF). There are three ALLOW rules created for each handler to send requests from Slack; \"/deploy\", \"/health\" and \"/C0T3QJQRX\" for history. \n\nThe last rule is \"BLOCK\" rule and if the \"Origin\" header is not coming from [Slack DNS entries](https://adjust.slack.com/help/urls) At the moment it only acts as a DENY rule since Slack requests have no \"Referer\" or \"Origin\" headers. If they add them, and we can verify the header matches the Source IP, then this Block rule will be very helpful. Otherwise it acts as \"Deny all\" if request is not made to the allowed handlers. \n\n![Web Application Firewall Rules](./docs/web-application-firewall-rules.png)\n\nMicaelbot runs as a systemd service with the following details:\n- Service unit file: `/etc/systemd/system/michaelbot.service`\n```\n[Unit]\nDescription=MichaelBot Go Application\nAfter=network.target\n\n[Service]\nType=simple\nUser=ubuntu\nWorkingDirectory=/home/ubuntu/michaelbot\nExecStart=/home/ubuntu/michaelbot/michaelbot\nRestart=on-failure\nRestartSec=10s\n\n# Environment variables\nEnvironmentFile=/etc/default/michaelbot\n\n# Logging\nStandardOutput=journal\nStandardError=journal\nSyslogIdentifier=michaelbot\n\n[Install]\nWantedBy=multi-user.target\n```\n- Environment variables configuration: `/etc/default/michaelbot`\n```\nSLACK_WEBAPI_TOKEN=****\nSLACK_SIGNING_SECRET=****\nGITHUB_TOKEN=****\nBOLTDB_PATH=****\n```\nHow to update MichaelBot\n------------------------\n\n```\nssh ubuntu@PUBLIC_IP\ncd michaelbot\ngit pull\ngit checkout master (or a feature branch)\ngo build -o michaelbot .\nsudo systemctl restart michaelbot.service\n```\n\n### Management Commands\n\nTo check Michaelbot status:\n```\nsudo systemctl status michaelbot.service\n```\n\nTo restart Michaelbot:\n```\nsudo systemctl restart michaelbot.service\n```\n\nTo check Michaelbot logs:\n```\nsudo journalctl -u michaelbot.service\n```\n\nEnvironment Variables\n--------------------\n\nThe following environment variables are used to configure the application:\n\n| Variable | Description |\n|----------|-------------|\n| `SLACK_SIGNING_SECRET` | Required for authenticating requests from Slack. Find it in your Slack App configuration under \"Basic Information\" \u003e \"Signing Secret\". |\n| `GITHUB_TOKEN` | GitHub personal access token with `repo` permissions to fetch PR details (title, description, author). Without this token, only public PRs will show detailed information. |\n| `SLACK_WEBAPI_TOKEN` | Slack Web API token used for channel topic management and direct message notifications. Required for deploy status in channel topic and user mention notifications. |\n| `BOLTDB_PATH` | Path to the BoltDB file for persistent storage of deploy history. If not set, deploy history is stored in memory only. |\n| `HISTORY_AUTH_SECRET` | Secret key used to sign JWT tokens for deploy history access. If not provided, a random string is generated on startup (check logs). |\n\nUsage\n-----\n\nDeploys are tracked per channel. This means that different channels can run different deploys at the same time.\n\n* \u003ckbd\u003e/deploy status\u003c/kbd\u003e — see if there is a deploy currently running.\n    \u003cimg src=\"../master/docs/deploy-status.png\" alt=\"Deploy status response\" height=\"50\"\u003e\n* \u003ckbd\u003e/deploy \u0026lt;subject\u0026gt;\u003c/kbd\u003e — initiate a deploy in the channel. \u003csubject\u003e is an arbitrary string describing what's being deployed.\n    \u003cimg src=\"../master/docs/deploy-start.png\" alt=\"Deploy announcement\" height=\"134\"\u003e\n\n    If there is already a deploy announced by another user in this channel, it needs to be finished first.\n    \u003cimg src=\"../master/docs/deploy-running.png\" alt=\"Deploy already started message\" height=\"54\"\u003e\n    \n    However if you already initiated a deploy the channel, you can update its subject by executing this command again.\n* \u003ckbd\u003e/deploy done\u003c/kbd\u003e — finish current deploy.\n\n    \u003cimg src=\"../master/docs/deploy-done.png\" alt=\"Deploy completion announcement\" height=\"44\"\u003e\n    \n    You can also finish a deploy started by another user.\n    \n    \u003cimg src=\"../master/docs/deploy-finish-other.png\" alt=\"Complete unfinished deploy\" height=\"42\"\u003e\n\n* \u003ckbd\u003e/deploy abort\u003c/kbd\u003e — abort current deploy.\n    If the things went wrong you might need to rollback your changes and abort current deploy.\n\n    \u003cimg src=\"../master/docs/deploy-abort.png\" alt=\"Deploy aborted announcement\" height=\"42\"\u003e\n\n    You may also provide a reason for aborting a deploy that will be kept in channel deploys log:\n    ```\n    /deploy abort something went wrong with deploy\n    ```\n\n    \u003cimg src=\"../master/docs/deploy-abort-reason.png\" alt=\"Deploy aborted with reason announcement\" height=\"42\"\u003e\n\n### Deploy status in channel topic\n\nIn addition to announcing deploys in channel you may find it useful to have a small sign in the channel topic. This way you can quickly check\nif it's safe to deploy. Slack deploy command uses :white_check_mark: and :no_entry: to mark channel as clear for deployment and show that there\nis a deploy in progress.\n\n\u003cimg src=\"../master/docs/topic-deploy.png\" alt=\"Channel topic notification\" height=\"270\"\u003e\n\nTo disable this feature without re-deploying the whole service simply remove emojis from channel topic.\n\n### User mentions in deploy subjects\n\nYou can mention one or multiple users in deploy subject.\n\n\u003cimg src=\"../master/docs/deploy-mention.png\" alt=\"Mentioning user in a deploy subject\" height=\"140\"\u003e\n\nOnce the deploy is done, they all will receive a direct message from deploy bot.\n\n\u003cimg src=\"../master/docs/deploy-mention-notification.png\" alt=\"Deploy done direct message notification\" height=\"44\"\u003e\n\n*Note: no notifications will be sent if the deploy has been aborted.*\n\n### Deploy history\n\nTo see the history of deploys in channel run \u003ckbd\u003e/deploy history\u003c/kbd\u003e in this channel and click the link returned by bot.\n\n\u003cimg src=\"../master/docs/deploy-history.png\" alt=\"Channel history link\" height=\"52\"\u003e\n\nThis will open a page in your browser with all deploys that were ever announced in this channel.\n\n```\n* suddendef was deploying https://github.com/adjust/michaelbot/pull/15 since 24 Aug 16 20:54 UTC until 24 Aug 16 20:54 UTC\n* suddendef was deploying https://github.com/adjust/michaelbot/pull/15 https://github.com/adjust/michaelbot/pull/11 since 24 Aug 16 20:54 UTC until 24 Aug 16 20:55 UTC\n* suddendef was deploying history since 25 Aug 16 08:35 UTC until 25 Aug 16 08:35 UTC\n* suddendef was deploying https://github.com/adjust/michaelbot/pull/19 since 25 Aug 16 08:35 UTC until 25 Aug 16 08:35 UTC\n```\n\nWhy Michael?\n------------\n\nBecause Buffer might be not the best name for such tool.\n\nLicense\n-------\n\nThis software is distributed under LGPLv3 license. You can find the full text in [LICENSE](../master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadjust%2Fmichaelbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadjust%2Fmichaelbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadjust%2Fmichaelbot/lists"}