{"id":17654118,"url":"https://github.com/andrewslotin/michael","last_synced_at":"2025-06-17T10:04:52.716Z","repository":{"id":46554035,"uuid":"60216854","full_name":"andrewslotin/michael","owner":"andrewslotin","description":"Deploy announcements and history for Slack channels ","archived":false,"fork":false,"pushed_at":"2021-10-05T22:33:32.000Z","size":1115,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T09:05:45.210Z","etag":null,"topics":["hacktoberfest"],"latest_commit_sha":null,"homepage":"","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/andrewslotin.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":"2016-06-01T23:12:42.000Z","updated_at":"2021-11-03T11:24:45.000Z","dependencies_parsed_at":"2022-09-16T16:13:53.133Z","dependency_job_id":null,"html_url":"https://github.com/andrewslotin/michael","commit_stats":null,"previous_names":["andrewslotin/slack-deploy-command"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewslotin%2Fmichael","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewslotin%2Fmichael/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewslotin%2Fmichael/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewslotin%2Fmichael/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andrewslotin","download_url":"https://codeload.github.com/andrewslotin/michael/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246296608,"owners_count":20754635,"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":["hacktoberfest"],"created_at":"2024-10-23T12:08:42.830Z","updated_at":"2025-03-30T09:15:14.825Z","avatar_url":"https://github.com/andrewslotin.png","language":"Go","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\nInstallation\n------------\n\nFirst you need to add a new slash command for your team:\n\n1. Go to [Custom Integrations](https://api.slack.com/custom-integrations) and click on \"New Command\"\n2. In the \"Command\" field type in \u003ckbd\u003e/deploy\u003c/kbd\u003e — this will be your new Slack command to start, finish and list deploys in channel\n3. Fill in \"URL\" field with an URL where `michael` is deployed\n4. Set \"Method\" to `POST`\n5. Copy the content of \"Token\" field, this will be needed to authenticate incoming requests\n\nYou may also like to customize name, icon and include this command into autocomplete list.\n\nNow the server part. To execute a slash command Slack sends a request to an URL associated with it and outputs the response.\nSlack requires this URL to be an HTTPS, so you will need some reverse-proxy (such as `nginx`, `caddy`, etc.) configured to serve HTTPS requests.\nSelf-signed certificates won't work for Slack, [Letsencrypt](https://letsencrypt.org) might be a good option to obtain a real one.\n\nNow compile and run the server (assuming that you have `go` installed):\n\n```\ngo get github.com/andrewslotin/michael\nSLACK_TOKEN=\u003ctoken you copied before\u003e $GOPATH/bin/michael\n```\n\nThis will run a server listening on `0.0.0.0:8081`. Check `$GOPATH/bin/michael --help` to see available options.\n\nOptionally you may provide your [GitHub personal access token](https://github.com/settings/tokens) with `repo` permissions by\nsetting `GITHUB_TOKEN` environment variable. This token is used to get PR details (title, description and author) and attach them to an announcement.\nIf no token is provided only public pull requests will be have detailed information, and others will only contain a link to GitHub.\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. To use this feature you need to provide [Slack Web API token](https://api.slack.com/docs/oauth-test-tokens) in\n`SLACK_WEBAPI_TOKEN` environment variable and add either `:white_check_mark:` or `:no_entry:` to the channel topic. Whenever the deploy changes\nthe deploy bot will swap these emojis.\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\nAs in case with deploy status in channel topic, you would need to provide [Slack Web API token](https://api.slack.com/docs/oauth-test-tokens) in\n`SLACK_WEBAPI_TOKEN` environment variable to enable this feature.\n\n### Persistent deploy statuses\n\nTo keep the deploy status between service restarts you might want to use built-in BoltDB database. To do this you need to specify the path to\nyour BoltDB file in `BOLTDB_PATH` environment variable.\n\n```go\nBOLTDB_PATH=/path/to/your/bolt.db $GOPATH/bin/michael\n```\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/andrewslotin/michael/pull/15 since 24 Aug 16 20:54 UTC until 24 Aug 16 20:54 UTC\n* suddendef was deploying https://github.com/andrewslotin/michael/pull/15 https://github.com/andrewslotin/michael/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/andrewslotin/michael/pull/19 since 25 Aug 16 08:35 UTC until 25 Aug 16 08:35 UTC\n```\n\n#### Authorization and authentication\n\nWhile handling the \u003ckbd\u003e/deploy history\u003c/kbd\u003e command deploy bot generates a one-time token that grants access to current channel\ndeploy history. This access is being granted for the next 30 days and can be renewed at any time by requesting and opening a link\nto history in the same channel.\n\nDeploy bot uses JSON Web Tokens (JWT) to store channel access lists. A secret key to sign JWT can be set via `HISTORY_AUTH_SECRET`\nenvironment variable. If there was no secret provided, deploy bot generates a random string and writes it into the log. On next\nstart you should use this string as a value for `HISTORY_AUTH_SECRET`, otherwise all issued authorizations will be revoked.\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","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewslotin%2Fmichael","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrewslotin%2Fmichael","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewslotin%2Fmichael/lists"}