{"id":13484935,"url":"https://github.com/slack-samples/deno-incident-management","last_synced_at":"2025-03-27T16:31:34.164Z","repository":{"id":114488849,"uuid":"553250238","full_name":"slack-samples/deno-incident-management","owner":"slack-samples","description":"Automate the responding, analyzing, and resolving of incidents","archived":true,"fork":false,"pushed_at":"2023-11-14T15:54:20.000Z","size":428,"stargazers_count":52,"open_issues_count":3,"forks_count":2,"subscribers_count":11,"default_branch":"main","last_synced_at":"2024-10-30T18:42:56.059Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/slack-samples.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}},"created_at":"2022-10-18T00:18:03.000Z","updated_at":"2024-10-29T16:31:24.000Z","dependencies_parsed_at":"2023-05-17T00:45:11.460Z","dependency_job_id":"0a53150f-4cf4-410a-9201-99a32518ebfe","html_url":"https://github.com/slack-samples/deno-incident-management","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"slack-samples/deno-starter-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slack-samples%2Fdeno-incident-management","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slack-samples%2Fdeno-incident-management/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slack-samples%2Fdeno-incident-management/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slack-samples%2Fdeno-incident-management/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slack-samples","download_url":"https://codeload.github.com/slack-samples/deno-incident-management/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245882445,"owners_count":20687891,"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-07-31T17:01:39.318Z","updated_at":"2025-03-27T16:31:33.733Z","avatar_url":"https://github.com/slack-samples.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"## ⚠️ This sample is undergoing maintenance and does not currently work as expected.\n\n\n# Incident Management\n\nThis sample automation uses workflows to simplify the process of incident\nmanagement, featuring the integration of external tools like Jira and Zoom.\n\n**Guide Outline**:\n\n- [Included Workflows](#included-workflows)\n- [Setup](#setup)\n  - [Install the Slack CLI](#install-the-slack-cli)\n  - [Clone the Sample](#clone-the-sample)\n  - [Atlassian \u0026 Zoom Access Tokens](#atlassian-and-zoom-access-tokens)\n- [Creating Triggers](#creating-triggers)\n- [Datastores](#datastores)\n- [Testing](#testing)\n- [Deploying Your App](#deploying-your-app)\n- [Viewing Activity Logs](#viewing-activity-logs)\n- [Project Structure](#project-structure)\n- [Resources](#resources)\n\n---\n\n## Included Workflows\n\n- **Create incident**: Submit an incident by providing details, determining a\n  severity, and optionally assiging a DRI\n- **Create incident report**: Generate a report that gives statistics of all\n  incidents within a designated incident channel\n\n## Setup\n\nBefore getting started, first make sure you have a development workspace where\nyou have permission to install apps. **Please note that the features in this\nproject require that the workspace be part of\n[a Slack paid plan](https://slack.com/pricing).**\n\n### Install the Slack CLI\n\nTo use this sample, you need to install and configure the Slack CLI.\nStep-by-step instructions can be found in our\n[Quickstart Guide](https://api.slack.com/automation/quickstart).\n\n### Clone the Sample\n\nStart by cloning this repository:\n\n```zsh\n# Clone this project onto your machine\n$ slack create my-app -t slack-samples/deno-incident-management\n\n# Change into the project directory\n$ cd my-app\n```\n\n### Atlassian and Zoom Access Tokens\n\nTo run this application, **access tokens are required in order to make calls to\nthe Atlassian and Zoom APIs**.\n\n`ZOOM_JWT_TOKEN` can be attained from the\n[Zoom Developer Site](https://developers.zoom.us/) and many of the Atlassian\nenvironment variables can be acquired by signing up for a free\n[Cloud Developer Bundle](https://www.atlassian.com/try/cloud/signup?product=confluence.ondemand,jira-software.ondemand,jira-servicedesk.ondemand,jira-core.ondemand\u0026developer=true)\nwith Atlassian.\n\n\u003e Your personal access token allows your application to perform the API calls\n\u003e used by functions as though it was _from your Atlassian and Zoom accounts_.\n\u003e That means all calls made from the Create Incident workflow will be made using\n\u003e the accounts associated with the personal access tokens in use!\n\n#### Add access tokens to environment variables\n\nStoring your access token as an environment variable allows you to use different\ntokens across local and deployed versions of the same app.\n\n- `INCIDENT_CHANNEL` is the channel ID of the designated, public incident\n  channel. This is where the app will post updates about a given incident.\n\n- `ZOOM_JWT_TOKEN` is used to make calls to the Zoom API.\n\n- `ATLASSIAN_INSTANCE` is your Atlassian instance name.\n\n- `ATLASSIAN_USERNAME` is the email from your Jira Cloud Developer account. This\n  is used to create and update Jira issues.\n\n- `ATLASSIAN_API_KEY` is used to make calls to the Atlassian API.\n\n- `ATLASSIAN_SPACE` is used to create an RCA Confluence page.\n\n- `JIRA_PROJECT` is the Jira project `Key` used to add and edit issues.\n\n##### Development Environment Variables\n\nWhen [developing locally](https://api.slack.com/automation/run), environment\nvariables found in the `.env` file at the root of your project are used. For\nlocal development, rename `.env.sample` to `.env` and add your access token to\nthe file contents (replacing `ACCESS_TOKEN` with your token):\n\n```bash\n# .env\nZOOM_JWT_TOKEN=ACCESS_TOKEN\n```\n\n##### Production Environment Variables\n\n[Deployed apps](https://api.slack.com/automation/deploy) use environment\nvariables that are added using `slack env`. To add your access token to a\nWorkspace where your deployed app is installed, use the following command (once\nagain, replacing `ACCESS_TOKEN` with your token):\n\n```zsh\n$ slack env add ZOOM_JWT_TOKEN ACCESS_TOKEN\n```\n\n### Configure Outgoing Domains\n\nHosted custom functions must declare which\n[outgoing domains](https://api.slack.com/automation/manifest) are used when\nmaking network requests, including Atlassian and Zoom calls. `api.zoom.com` is\nalready configured as an outgoing domain in this sample's manifest, but you'll\nalso need to provide your Atlassian subdomain\n(`\u003cyour-subdomain\u003e.atlassian.net`).\n\n## Creating Triggers\n\n[Triggers](https://api.slack.com/automation/triggers) are what cause workflows\nto run. These triggers can be invoked by a user, or automatically as a response\nto an event within Slack.\n\nWhen you `run` or `deploy` your project for the first time, the CLI will prompt\nyou to create a trigger if one is found in the `triggers/` directory. For any\nsubsequent triggers added to the application, each must be\n[manually added using the `trigger create` command](#manual-trigger-creation).\n\nWhen creating triggers, you must select the workspace and environment that you'd\nlike to create the trigger in. Each workspace can have a local development\nversion (denoted by `(local)`), as well as a deployed version. _Triggers created\nin a local environment will only be available to use when running the\napplication locally._\n\n### Link Triggers\n\nA [link trigger](https://api.slack.com/automation/triggers/link) is a type of\ntrigger that generates a **Shortcut URL** which, when posted in a channel or\nadded as a bookmark, becomes a link. When clicked, the link trigger will run the\nassociated workflow.\n\nLink triggers are _unique to each installed version of your app_. This means\nthat Shortcut URLs will be different across each workspace, as well as between\n[locally run](#running-your-project-locally) and\n[deployed apps](#deploying-your-app).\n\nWith link triggers, after selecting a workspace and environment, the output\nprovided will include a Shortcut URL. Copy and paste this URL into a channel as\na message, or add it as a bookmark in a channel of the workspace you selected.\nInteracting with this link will run the associated workflow.\n\n**Note: triggers won't run the workflow unless the app is either running locally\nor deployed!**\n\n### Manual Trigger Creation\n\nTo manually create a trigger, use the following command:\n\n```zsh\n$ slack trigger create --trigger-def triggers/create_incident.ts\n```\n\n## Datastores\n\nFor storing data related to your app, datastores offer secure storage on Slack\ninfrastructure. For an example of a datastore, see `datastores/incidents.ts`.\nThe use of a datastore requires the `datastore:write`/`datastore:read` scopes to\nbe present in your manifest.\n\n## Testing\n\nTest filenames should be suffixed with `_test`.\n\nRun all tests with `deno test`:\n\n```zsh\n$ deno test\n```\n\n## Deploying Your App\n\nOnce development is complete, deploy the app to Slack infrastructure using\n`slack deploy`:\n\n```zsh\n$ slack deploy\n```\n\nWhen deploying for the first time, you'll be prompted to\n[create a new link trigger](#creating-triggers) for the deployed version of your\napp. When that trigger is invoked, the workflow should run just as it did when\ndeveloping locally (but without requiring your server to be running).\n\n## Viewing Activity Logs\n\nActivity logs of your application can be viewed live and as they occur with the\nfollowing command:\n\n```zsh\n$ slack activity --tail\n```\n\n## Project Structure\n\n### `.slack/`\n\nContains `apps.dev.json` and `apps.json`, which include installation details for\ndevelopment and deployed apps.\n\n### `datastores/`\n\n[Datastores](https://api.slack.com/automation/datastores) securely store data\nfor your application on Slack infrastructure. Required scopes to use datastores\ninclude `datastore:write` and `datastore:read`.\n\n### `functions/`\n\n[Functions](https://api.slack.com/automation/functions) are reusable building\nblocks of automation that accept inputs, perform calculations, and provide\noutputs. Functions can be used independently or as steps in workflows.\n\n### `triggers/`\n\n[Triggers](https://api.slack.com/automation/triggers) determine when workflows\nare run. A trigger file describes the scenario in which a workflow should be\nrun, such as a user pressing a button or when a specific event occurs.\n\n### `workflows/`\n\nA [workflow](https://api.slack.com/automation/workflows) is a set of steps\n(functions) that are executed in order.\n\nWorkflows can be configured to run without user input or they can collect input\nby beginning with a [form](https://api.slack.com/automation/forms) before\ncontinuing to the next step.\n\n### `manifest.ts`\n\nThe [app manifest](https://api.slack.com/automation/manifest) contains the app's\nconfiguration. This file defines attributes like app name and description.\n\n### `slack.json`\n\nUsed by the CLI to interact with the project's SDK dependencies. It contains\nscript hooks that are executed by the CLI and implemented by the SDK.\n\n## Resources\n\nTo learn more about developing automations on Slack, visit the following:\n\n- [Automation Overview](https://api.slack.com/automation)\n- [CLI Quick Reference](https://api.slack.com/automation/cli/quick-reference)\n- [Samples and Templates](https://api.slack.com/automation/samples)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslack-samples%2Fdeno-incident-management","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslack-samples%2Fdeno-incident-management","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslack-samples%2Fdeno-incident-management/lists"}