https://github.com/coreos/triagebot
Simple Slack triage helper for Jira bugs
https://github.com/coreos/triagebot
Last synced: 12 months ago
JSON representation
Simple Slack triage helper for Jira bugs
- Host: GitHub
- URL: https://github.com/coreos/triagebot
- Owner: coreos
- License: apache-2.0
- Created: 2021-04-24T00:12:32.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-11-18T17:49:01.000Z (over 1 year ago)
- Last Synced: 2025-04-14T22:09:17.503Z (about 1 year ago)
- Language: Python
- Homepage: https://quay.io/repository/coreos/triagebot
- Size: 71.3 KB
- Stars: 3
- Watchers: 11
- Forks: 5
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Triagebot
This is a Slack bot to help with triaging Jira issues. It reports new issues to a designated Slack channel and tracks whether the issues have been triaged.
## Flows
- New issue arrives on a configured Jira project and component →
send message to channel and pin it to the channel
- Open issue with default or no assignee arrives on a configured component →
same behavior as New issue
- "Resolve" button clicked on an issue message →
unpin message from channel, update message to show that the issue is resolved, log resolution as threaded reply
- "Time out" button clicked on an issue message where the issue has "Need Info From" set →
set timer, update message to show that a timeout has been set, log threaded reply
- Issue with pending timeout is moved out of the monitored components or out of New, is assigned, has "Need Info From" cleared, or gets a new issue comment →
clear timeout, update message to remove timeout, log threaded reply
- Issue with pending timeout reaches the timeout →
post comment to the issue and close it as Cannot Reproduce, mark issue resolved
- Bot mentioned in `unresolve` message in issue thread →
repin message to channel, update message to show that the issue is unresolved
- Resolved issue is moved to New or to any open state with default or no assignee, in a configured component →
same behavior as `unresolve` message; also send threaded reply noting the change in issue status
- Bot mentioned with `track ` →
same behavior as New issue; also send threaded reply noting which user requested tracking
## Installing
A `setup.cfg` would be nice, but we don't have one right now.
```sh
cd ~
git clone https://github.com/coreos/triagebot
cd triagebot
virtualenv env
env/bin/pip install -r requirements.txt
env/bin/python triagebot.py
```
Alternatively, a [container image](https://quay.io/repository/coreos/triagebot) is available.
You'll also need to set up a Slack app in your workspace and get an API token for it, and to get a Jira personal access token.
## Slack scopes
- `app_mentions:read` - receive commands via mentions in channel
- `chat:write` - send messages and threaded replies to channel
- `im:write` - send error reports to the bot administrator
- `pins:write` - pin/unpin unresolved threads in channel
- `reactions:write` - react to command messages to indicate status
## Config format
See [config.example](config.example). Put this in `~/.triagebot` by default.