Slack and GitHub integration for automating code review requests
Project description
review-request
A Slack bot and GitHub integration for automating code review requests. Engineers use a Slack slash command to broadcast a PR review request to their channel; a scheduled script scans GitHub for open PRs and reminds teams daily; a Jira webhook posts sprint completion summaries.
Features
- Slash command —
/review [PR URL] [@reviewer or #channel] [--scheduled=YYYY/MM/DD HH:MM:SS] - Daily PR reminder — scans configured GitHub repositories, finds open PRs assigned to a team, and posts a Slack digest
- Jira sprint webhook — posts a summary when a Jira sprint closes
- Jira overdue reminder — alerts a team about Jira issues that are in-progress past their due date
Setup
Requirements: Python 3.11+
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
Create a .env file:
GITHUB_TOKEN=...
BOT_TOKEN=xoxb-...
CHANNEL_ID=C...
SLACK_SIGNING_SECRET=...
ROLLBAR_ACCESS_TOKEN=...
JIRA_SITE=https://yourorg.atlassian.net
JIRA_EMAIL=you@example.com
JIRA_API_TOKEN=...
APP_URL=https://your-deployment-url # optional, for bot icon
MAX_AGE_PR_DAYS=60 # optional, default 60
Running
# Web server (Slack slash command + Jira webhooks)
uvicorn main:app --reload
# Scheduled scripts (typically run via cron)
pr-reminder [--dry-run]
jira-overdue-reminder
Slash Command Usage
The bot accepts a slash command payload with the following format in the text field:
<PR_URL> [@user or #channel or @group] [--scheduled=2025/12/01 09:00:00]
Examples:
https://github.com/org/repo/pull/123 @alice #code-review— post immediately to#code-reviewtagging@alicehttps://github.com/org/repo/pull/123 @squad-eternals— post to the invoking channel tagging the usergrouphttps://github.com/org/repo/pull/123 --scheduled=2025/12/01 09:00:00— schedule delivery (GMT+7)
If no reviewer is specified, the bot falls back to the team(s) already requested on the GitHub PR. Up to 2 PR URLs can be submitted in a single command.
Configuration
Team-to-channel mappings, the list of GitHub repositories to scan, and reminder schedules are all hardcoded in src/review_request/config/settings.py:
GITHUB_REPOSITORIES— repos scanned bypr-reminderGITHUB_TEAM_REMINDER_MAPPING— maps a GitHub team slug to a Slack channel and usergroup, with the days reminders should fireJIRA_TEAM_REMINDER_MAPPING— JQL query + channel mapping for the Jira overdue reminderSLACK_TEAM_MAPPINGS— overrides for Slack@handle → group IDwhen a reviewer handle appears in GitHub PR reviewer lists
API Endpoints
| Method | Path | Description |
|---|---|---|
POST |
/conversation/ |
Slack slash command handler |
POST |
/jira/sprint/webhook?channel_id=... |
Jira sprint-closed webhook |
POST |
/jira/sprint/notify |
Manual sprint completion notification |
Development
pytest # run all tests
pytest tests/path/test.py::fn # run a single test
ruff check src/ && black src/ # lint and format
mypy src/ # type check
pre-commit run --all-files # run all pre-commit hooks
Publishing
Merging to main automatically publishes to PyPI via GitHub Actions using OIDC trusted publishing (no stored token required).
Before merging, bump the version so PyPI doesn't reject a duplicate:
./scripts/bump_version.sh # patch bump (0.1.0 → 0.1.1)
./scripts/bump_version.sh minor # minor bump (0.1.0 → 0.2.0)
./scripts/bump_version.sh major # major bump (0.1.0 → 1.0.0)
This updates pyproject.toml and src/review_request/__init__.py in one step.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file review_request-0.1.2.tar.gz.
File metadata
- Download URL: review_request-0.1.2.tar.gz
- Upload date:
- Size: 32.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4a6f3afab37a679fa0c41f94351552b87e1c492b6e24b9d5079673da1b17f29
|
|
| MD5 |
fbd4635f381d21df0a97c9fca37a08e4
|
|
| BLAKE2b-256 |
486ca022dc1bda212d648aa7dcb1e9d62a0ceab07ea62f893accaf5f8a6c96d9
|
Provenance
The following attestation bundles were made for review_request-0.1.2.tar.gz:
Publisher:
publish.yml on kingkong0905/review-request
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
review_request-0.1.2.tar.gz -
Subject digest:
b4a6f3afab37a679fa0c41f94351552b87e1c492b6e24b9d5079673da1b17f29 - Sigstore transparency entry: 1934913830
- Sigstore integration time:
-
Permalink:
kingkong0905/review-request@ed3489e7aeea18eddf56daed4fa1b1cb0c7f63ba -
Branch / Tag:
refs/heads/main - Owner: https://github.com/kingkong0905
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ed3489e7aeea18eddf56daed4fa1b1cb0c7f63ba -
Trigger Event:
push
-
Statement type:
File details
Details for the file review_request-0.1.2-py3-none-any.whl.
File metadata
- Download URL: review_request-0.1.2-py3-none-any.whl
- Upload date:
- Size: 42.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12a0882fea80750648ee505ad9b3bc156b2306e20e95c8436862631e13bc87ee
|
|
| MD5 |
26439b2ee07dfabcb3b68ff15510e0a3
|
|
| BLAKE2b-256 |
ce97acd71abde00dade3d03969b09ff68f33ad036f4f2dcf66e162707ba1bbe2
|
Provenance
The following attestation bundles were made for review_request-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on kingkong0905/review-request
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
review_request-0.1.2-py3-none-any.whl -
Subject digest:
12a0882fea80750648ee505ad9b3bc156b2306e20e95c8436862631e13bc87ee - Sigstore transparency entry: 1934913873
- Sigstore integration time:
-
Permalink:
kingkong0905/review-request@ed3489e7aeea18eddf56daed4fa1b1cb0c7f63ba -
Branch / Tag:
refs/heads/main - Owner: https://github.com/kingkong0905
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ed3489e7aeea18eddf56daed4fa1b1cb0c7f63ba -
Trigger Event:
push
-
Statement type: