forked from qodo-ai/pr-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Overview
Add Slack integration for notifications and slash commands.
Webhook Support ✅
Slack provides multiple webhook mechanisms:
Events API
app_mention- Bot mentioned in channelmessage- New message in channelreaction_added- Emoji reaction added
Slash Commands
Custom commands like /pr-agent review <url>
Identification
- Header:
X-Slack-Signature(HMAC SHA256) - Header:
X-Slack-Request-Timestamp - Payload: Contains
team_id,api_app_id - Challenge: URL verification returns
challengefield
Signature Verification
sig_basestring = f"v0:{timestamp}:{body}"
expected = "v0=" + hmac.new(secret, sig_basestring, sha256).hexdigest()Event Payload
{
"type": "event_callback",
"team_id": "T123",
"api_app_id": "A123",
"event": {
"type": "app_mention",
"user": "U123",
"text": "<@bot> /review https://github.com/...",
"channel": "C123"
}
}Slash Command Payload
{
"command": "/pr-agent",
"text": "review https://github.com/...",
"response_url": "https://hooks.slack.com/...",
"trigger_id": "xxx",
"user_id": "U123",
"channel_id": "C123"
}Tasks
- Add Slack Events API webhook handler
- Implement slash commands (
/pr-agent review,/pr-agent describe) - Send PR notifications to Slack channels
- Interactive buttons for PR actions
- Thread replies for PR updates
Use Cases
- Notifications: Alert channel when PR needs review
- Commands:
/pr-agent reviewfrom Slack - Summaries: Daily PR summary in channel
- Approvals: Approve PRs via Slack buttons
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request