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 Discord bot integration for notifications and slash commands.
Interaction Webhooks ✅
Discord uses HTTP interactions (not WebSocket required):
Interaction Types
1- PING (verification)2- APPLICATION_COMMAND (slash commands)3- MESSAGE_COMPONENT (buttons, selects)4- APPLICATION_COMMAND_AUTOCOMPLETE5- MODAL_SUBMIT
Identification
- Header:
X-Signature-Ed25519(Ed25519 signature) - Header:
X-Signature-Timestamp - Payload: Contains
type,application_id,guild_id
Signature Verification (Ed25519)
from nacl.signing import VerifyKey
verify_key = VerifyKey(bytes.fromhex(public_key))
message = timestamp.encode() + body
verify_key.verify(message, bytes.fromhex(signature))Interaction Payload
{
"type": 2,
"id": "interaction_id",
"application_id": "app_id",
"guild_id": "server_id",
"channel_id": "channel_id",
"member": {
"user": { "id": "user_id", "username": "user" }
},
"data": {
"name": "review",
"options": [{ "name": "url", "value": "https://..." }]
}
}Tasks
- Add Discord interaction handler
- Implement slash commands (
/review,/describe,/ask) - Ed25519 signature verification
- Send PR notifications to Discord channels
- Embed-rich PR summaries
- Button interactions for quick actions
Use Cases
- Notifications: Alert channel when PR opens/updates
- Commands:
/review <pr_url>from Discord - Rich Embeds: Formatted PR summaries with status
- Buttons: Approve/request changes via buttons
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request