{"id":14957258,"url":"https://github.com/vercel/response","last_synced_at":"2025-09-30T03:30:56.272Z","repository":{"id":65976724,"uuid":"205176455","full_name":"vercel/response","owner":"vercel","description":"Monzo's real-time incident response and reporting tool ⚡️","archived":false,"fork":true,"pushed_at":"2019-10-07T16:47:28.000Z","size":1332,"stargazers_count":9,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-09-18T03:38:10.171Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"monzo/response","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vercel.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":"2019-08-29T13:58:50.000Z","updated_at":"2024-09-17T03:35:46.000Z","dependencies_parsed_at":"2023-02-19T19:00:37.295Z","dependency_job_id":null,"html_url":"https://github.com/vercel/response","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vercel%2Fresponse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vercel%2Fresponse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vercel%2Fresponse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vercel%2Fresponse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vercel","download_url":"https://codeload.github.com/vercel/response/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219865623,"owners_count":16554164,"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-09-24T13:14:26.885Z","updated_at":"2025-09-30T03:30:50.791Z","avatar_url":"https://github.com/vercel.png","language":"JavaScript","readme":"[![PyPI](https://img.shields.io/pypi/v/django-incident-response.svg)](https://pypi.org/project/django-incident-response/)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/django-incident-response.svg)](https://docs.python.org/3/)\n[![PyPI - Django Version](https://img.shields.io/pypi/djversions/django-incident-response.svg)](https://docs.djangoproject.com/en/2.2/)\n[![Travis (.org)](https://img.shields.io/travis/monzo/response.svg)](https://travis-ci.org/monzo/response)\n[![GitHub](https://img.shields.io/github/license/monzo/response.svg)](https://choosealicense.com/licenses/mit/)\n\n# Response ⚡\n\nDealing with incidents can be stressful. On top of dealing with the issue at hand, responders are often responsible for handling comms, coordinating the efforts of other engineers, and reporting what happened after the fact.  Monzo built Response to help reduce the pressure and cognitive burden on engineers during an incident, and to make it easy to create information rich reports for others to learn from.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"300px\" src=\"./docs/headline_post.png\"\u003e\u003cbr /\u003e\n  \u003cem\u003eThe headline post when an incident is declared\u003c/em\u003e\n\u003c/p\u003e\n\nIf you're interested in how we use this tool at Monzo, there's an overview in [this video](https://twitter.com/evnsio/status/1116026261401247745).\n\n---\n\n# Try it out\n\nResponse is a Django app which you can include in your project.  If you're just looking to give it a try, follow the instuctions for the [demo app](demo/README.md)!\n\n---\n\n# Adding Response to your own project\n\n[Start a new Django project](https://docs.djangoproject.com/en/2.2/intro/tutorial01/), if you don't have one already:\n```\n$ django-admin startproject myincidentresponse\n```\n\nInstall response:\n```\n$ pip install django-incident-response\n```\n\nIn `settings.py`, add these lines to `INSTALLED_APPS`:\n```\nINSTALLED_APPS = [\n    ...\n    \"after_response\",\n    \"rest_framework\",\n    \"bootstrap4\",\n    \"response.apps.ResponseConfig\",\n]\n```\n\nAdd the following to `settings.py`:\n\n```\nUSE_TZ = False # if this exists elsewhere in your settings.py, just update the value\n\nSTATIC_ROOT = \"static\"\n\n# Django Rest Framework\nREST_FRAMEWORK = {\n    \"PAGE_SIZE\": 100,\n    \"DEFAULT_PAGINATION_CLASS\": \"rest_framework.pagination.LimitOffsetPagination\",\n    \"DEFAULT_PERMISSION_CLASSES\": [\n        \"rest_framework.permissions.IsAuthenticated\",\n    ],\n}\n#\n\n# Markdown Filter\nMARKDOWN_FILTER_WHITELIST_TAGS = [\n    \"a\", \"p\", \"code\", \"h1\", \"h2\", \"ul\", \"li\", \"strong\", \"em\", \"img\",\n]\n\nMARKDOWN_FILTER_WHITELIST_ATTRIBUTES = [\"src\", \"style\"]\n\nMARKDOWN_FILTER_WHITELIST_STYLES = [\n    \"width\", \"height\", \"border-color\", \"background-color\", \"white-space\",\n    \"vertical-align\", \"text-align\", \"border-style\", \"border-width\", \"float\",\n    \"margin\", \"margin-bottom\", \"margin-left\", \"margin-right\", \"margin-top\",\n]\n\nRESPONSE_LOGIN_REQUIRED = True\n```\n\nIn `urls.py`, add the following to `urlpatterns` (you may also need to import `include`):\n```\nurlpatterns = [\n    ...\n    path('slack/', include('response.slack.urls')),\n    path('core/', include('response.core.urls')),\n    path('', include('response.ui.urls')),\n]\n```\n\n---\n\n# Completing the setup and config with Slack\n\n## 1. Create a Slack App\n\n- Navigate to [https://api.slack.com/apps](https://api.slack.com/apps) and click `Create New App`.\n- Give it a name, e.g. 'Response', and select the relevant workspace.\n\n- In the OAuth and Permissions page, scroll down to scopes.\n\n- Add the following scopes:\n  - `channels:history`\n  - `channels:read`\n  - `channels:write`\n  - `reactions:write`\n  - `chat:write:bot`\n  - `chat:write:user`\n  - `users:read`\n  - `users:read.email`\n\n- At the top of the page, the `Install App to Workspace` button is now available.  Click it!\n\n## 2. Update your `settings.py`\n\n### Base site address (`SITE_URL`)\n\nResponse needs to know where it is running in order to create links to the UI in Slack.  Whilst running locally, you might want this set to something like `http://localhost:8000`.\n\n### OAuth Access Token (`SLACK_TOKEN`)\n\nResponse needs an OAuth access token to use the Slack API.\n\n- Copy the token that starts `xoxp-...` from the OAuth \u0026 Permissions section of your Slack App and use it to set the `SLACK_TOKEN` variable.\n\n**Note:** Since some of the APIs commands we use require a _user_ token, we only need the token starting with `xoxp-...`.  If/when Slack allow these actions to be controlled by Bots, we can use the _bot_ token, starting `xoxb-...`.\n\n### Slack Client (`SLACK_CLIENT`)\n\nResponse needs a shared global instance of a Slack Client to talk to the Slack API. Typically this does not require any additional configuration.\n\n```python\nfrom response.slack.client import SlackClient\nSLACK_CLIENT = SlackClient(SLACK_TOKEN)\n```\n\n### Signing Secret (`SLACK_SIGNING_SECRET`)\n\nResponse uses the Slack signing secret to restrict access to public endpoints.\n\n- Copy the Signing secret from the Basic Information page and use it to set the `SIGNING SECRET` variable.\n\n### Incident Channel and ID (`INCIDENT_CHANNEL_NAME`, `INCIDENT_CHANNEL_ID`)\n\nWhen an incident is declared, a 'headline' post is sent to a central channel.\n\nSee the demo app for an example of how to get the incident channel ID from the Slack API.\n\n### Bot Name and ID (`INCIDENT_BOT_NAME`, `INCIDENT_BOT_ID`)\n\nWe want to invite the Bot to all Incident Channels, so need to know its ID.\n\n\n## 3. Running the server\n\nBefore you can complete the Slack app setup, you need to have the app running somewhere that's accesible to to the internet.  That means either deploying your Django project somewhere (see [here](https://lmgtfy.com/?q=deploy+django+app\u0026s=) or running it locally and exposing with something like [ngrok](https://ngrok.com/).\n\nFor simplicity, we'll assume you're developing using ngrok.\n\nFirst make sure your DB is fully migrated and up-to-date:\n```\npython3 manage.py migrate\n```\n\nNext, run the Django development server:\n```\npython3 manage.py runserver 0.0.0.0:8000\n```\n\nFinally, run ngrok:\n```\nngrok http 8000\n```\n\nMake note of the ngrok url as you'll need it in the following section as the `public-url`.\n\n## 4. Complete the Slack App Setup\n\nHead back to the Slack web UI and complete the configuration of your app, as [described here](./docs/slack_app_config.md).\n\n## 5. Test it's working!\n\nIn Slack, start an incident with `/incident Something's happened`.  You should see a post in your incidents channel!\n\n- Visit the incident doc by clicking the Doc link.\n- Create a comms channel by clicking the button.\n- In the comms channel check out the `@incident` commands.  You can find the ones available by entering `@incident help`.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvercel%2Fresponse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvercel%2Fresponse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvercel%2Fresponse/lists"}