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 Vercel deployment monitoring to PR-Agent, supporting both webhooks and polling.
Webhook Support
Vercel provides webhooks for deployment lifecycle events:
Events
deployment.created- New deployment starteddeployment.succeeded/deployment.ready- Deployment completed successfullydeployment.error- Deployment faileddeployment.canceled- Deployment was canceled
Identification
- Header:
x-vercel-signature(HMAC SHA1) - User-Agent: Contains "Vercel"
- Payload: Contains
type,deploymentId,projectId
Payload Structure
{
"type": "deployment.succeeded",
"id": "webhook_event_id",
"payload": {
"deployment": {
"id": "dpl_xxx",
"url": "my-app-xxx.vercel.app",
"state": "READY",
"meta": {
"githubCommitSha": "abc123",
"githubCommitRef": "main"
}
},
"project": { "id": "prj_xxx", "name": "my-app" }
}
}Polling Alternative
REST API endpoints for deployment status:
GET /v6/deployments- List deployments with filtersGET /v13/deployments/{id}- Get deployment details
Tasks
- Implement
VercelPollerinpolling/vercel.py - Add Vercel config to CLI (
vercel_token,vercel_team_id) - Create deployment failure handler (analyze build logs)
- Auto-comment deployment preview URLs on PRs
- Correlate deployments with GitHub PRs via commit SHA
Use Cases
- Deployment Alerts: Notify when deployments fail
- PR Comments: Auto-comment deployment preview URLs
- Build Analysis: AI analysis of failed build logs
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request