{"id":20726999,"url":"https://github.com/hmcts/incident-response-api","last_synced_at":"2025-08-20T09:19:55.093Z","repository":{"id":44495240,"uuid":"265168994","full_name":"hmcts/incident-response-api","owner":"hmcts","description":null,"archived":false,"fork":false,"pushed_at":"2024-09-17T04:52:23.000Z","size":159,"stargazers_count":0,"open_issues_count":12,"forks_count":1,"subscribers_count":16,"default_branch":"master","last_synced_at":"2024-09-17T07:46:40.919Z","etag":null,"topics":["platops-owned-app","slack"],"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/hmcts.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-19T06:53:24.000Z","updated_at":"2024-07-22T14:41:18.000Z","dependencies_parsed_at":"2023-09-22T20:49:17.205Z","dependency_job_id":"781ac1e6-14f9-4273-a95b-b0ecb787bca7","html_url":"https://github.com/hmcts/incident-response-api","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/hmcts%2Fincident-response-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmcts%2Fincident-response-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmcts%2Fincident-response-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmcts%2Fincident-response-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hmcts","download_url":"https://codeload.github.com/hmcts/incident-response-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243004649,"owners_count":20220343,"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":["platops-owned-app","slack"],"created_at":"2024-11-17T04:28:49.534Z","updated_at":"2025-03-11T09:21:03.158Z","avatar_url":"https://github.com/hmcts.png","language":"Python","readme":"# incident-response-api\n\nThis is the backend for the incident response slack bot.\n\nBased off work done in https://github.com/monzo/response\n\n## Local development\n\n### Slack app\n\nYou will need a slack app to be able to test this fully.\n\nCreate a new app to test and configure it with the values from https://github.com/hmcts/response/blob/master/docs/slack_app_create.md.\n\nBack in your IDE, copy env-template file and rename it to .env and fill out the fields.\n\nSee https://github.com/hmcts/response/tree/master/demo#2-configure-the-demo-app for the values you need.\n\n### Running the app locally\n\nUse `docker compose up` to build the required docker containers and test the application.\n\nYou can reach the UI via `http://localhost:8000`\n\n### Testing with the Slack app\n\nIn order to test your app works properly with Slack and its features like slash commands, it needs to be publicly reachable.\n\nYou can use a service called ngrok to make it reachable over the internet.\n\n**Be careful when using this as it will expose the application to anyone. Only do this when necessary and remember to run `docker compose down` when finished.**\n\nSign up for an account with ngrok and obtain an API key and auth token.\n\nCreate a file called `.ngrok.yml` in your local repo with settings similar to this:\n\n```\ntunnels:\n  httpbin:\n    proto: http\n    addr: response:8000\nversion: 2\nauthtoken: \u003cYOUR AUTH TOKEN\u003e\napi_key: \u003cYOUR API KEY\u003e\nweb_addr: 0.0.0.0:8000\nupdate: false\nlog: stdout\n```\n\nThis file has been added to the gitignore so it does not get committed.\n\nIn the provided docker-compose.yaml file, there is an ngrok section that has been commented out.\n\nUncomment this section and run `docker compose up`.\n\nGo to your ngrok account in your browser and click on `Endpoints`. There you will see your endpoint URL.\n\nUpdate your slack app redirect URLs to your ngrok endpoint URL and add the appropriate endings e.g. `/slack/slash_command`, so you can test slash commands and other features.\n\n**Ngrok endpoint URLs will regenerate every time you recreate the ngrok container**\n\nOnce you've done that, you can test the app from the slack desktop client using slash commands e.g. `/incident`.\n\n### Checking the logs\n\nTo see the logs of your docker container you can run:\n\n```\ndocker logs response -f\n```\n\nThis will output the logs to your terminal and follow them so you can see what's happening in real time.\n\n### Useful docker commands\n\n`docker compose up -d` - builds the docker containers in the background so you don't have the logs taking over your terminal.\n`docker compose up -d --build` - rebuilds the containers from scratch so they pick up changes you've made to your application or dockerfiles.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhmcts%2Fincident-response-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhmcts%2Fincident-response-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhmcts%2Fincident-response-api/lists"}