{"id":20746911,"url":"https://github.com/johnagan/triagebot-example","last_synced_at":"2025-04-28T11:21:40.282Z","repository":{"id":55369759,"uuid":"73024347","full_name":"johnagan/triagebot-example","owner":"johnagan","description":"A triage bot example for Slack","archived":false,"fork":false,"pushed_at":"2021-01-05T00:41:33.000Z","size":60,"stargazers_count":18,"open_issues_count":4,"forks_count":20,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-30T09:05:21.937Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/johnagan.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-11-06T22:54:52.000Z","updated_at":"2023-03-04T18:21:47.000Z","dependencies_parsed_at":"2022-08-14T22:41:39.685Z","dependency_job_id":null,"html_url":"https://github.com/johnagan/triagebot-example","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/johnagan%2Ftriagebot-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnagan%2Ftriagebot-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnagan%2Ftriagebot-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnagan%2Ftriagebot-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnagan","download_url":"https://codeload.github.com/johnagan/triagebot-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251302787,"owners_count":21567607,"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-17T08:09:51.171Z","updated_at":"2025-04-28T11:21:40.246Z","avatar_url":"https://github.com/johnagan.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":":construction:  **This repository is no longer being maintained.** :construction: \n\n@slackapi has a similar and more up-to-date :sparkles: version of this app at https://github.com/slackapi/template-triage-bot that uses functionality which predate this one, including  Shortcuts, Granular Bot Scopes, and Bolt for Javascript.\n\n---\n\n## What is a Triage Bot?\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)\nAfter triggering this bot through a slash command, it will scan the last 1000 messages in the current channel and look for messages that contain certain emojis [[configurable](settings.json#L10)] in the text (not reactions). These messages will be grouped into statuses and reported to the user.\n\n### Statuses\n* [Pending](settings.json#L10) - Messages pending review\n* [Review](settings.json#L17) - Messages that are in review\n* [Addressed](settings.json#L20) - Messages that have been addressed\n\n## Requirements\n* A [Slash Command](https://my.slack.com/services/new/slash-commands) setup on your Slack Team\n* A [Slack Bot Token](https://my.slack.com/services/new/bot) or a token with at least the `channels:history` scope\n\n## Usage\n\n### Environment Variables\n* `TOKEN` - The Slack token\n* `PORT` - The webserver port\n* `LOCALE` - The preferred locale. Defaults to `en`\n\n### Starting\n```shell\nTOKEN=xoxp-XXXXXXXXXX PORT=3000 LOCALE=pirate npm start\n```\n\n### Contents\n* [index.js](index.js) - A very basic webserver and http client to post back to Slack\n* [triage.js](triage.js) - The main functionality lies here. Pass in the Slash command payload, the channel history, and optionally any settings overrides. You'll get a formatted Slack message with the results.\n\n### API\n```js\nlet message = triage(\n  payload,    // The payload from the Slack slash command\n  messages,   // An array of slack messages to triage\n  settings    // Any settings overrides to apply [optional]\n);\n```\n\n### Settings\nYou can adjust the messages, emoji, and reactjis by updates the [settings.json](settings.json) file or passing in any overrides you'd like to the main function.\n\n```js\ntriage(payload, messages, {\n  display: [ \"pending\", \"review\" ]\n});\n```\n\n\n## Private Response\n![triage-private](https://cloud.githubusercontent.com/assets/35968/20042579/5dfe2390-a431-11e6-8ff6-ed8158329328.png)\n\n## Public Response\n![triage-public](https://cloud.githubusercontent.com/assets/35968/20042580/5e01c3ba-a431-11e6-8db3-6e0f7021d979.png)\n\n\n## Existing Apps\nAlready have an app and just want the Triage builder? No problem, you could require this package or copy the contents from [triage.js](triage.js).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnagan%2Ftriagebot-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnagan%2Ftriagebot-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnagan%2Ftriagebot-example/lists"}