A serverless webhook service that integrates Jira releases with Slack notifications, optimized for Vercel deployment.
- 🚀 Serverless deployment on Vercel
- 📬 Rich Slack notifications for Jira releases
- 🔒 Secure environment variable management
- 🏥 Health check endpoint
- 📝 Comprehensive error handling and logging
- 🎯 CORS support for cross-origin requests
- Node.js (v14 or higher)
- Vercel CLI installed globally
- Jira Cloud instance
- Slack workspace with webhook permissions
npm installCopy .env.example to .env and configure:
cp .env.example .envRequired variables:
JIRA_BASE_URL: Your Jira instance URL (e.g.,https://company.atlassian.net)JIRA_EMAIL: Your Jira account emailJIRA_API_TOKEN: Generate API tokenSLACK_WEBHOOK_URL: Create Slack incoming webhook
# Install dependencies
npm install
# Start local development server
npm run dev
# Test health check
curl http://localhost:3000/health# Login to Vercel
vercel login
# Deploy
vercel --prod# Add environment variables
vercel env add JIRA_BASE_URL
vercel env add JIRA_EMAIL
vercel env add JIRA_API_TOKEN
vercel env add SLACK_WEBHOOK_URL
# Redeploy with new environment variables
vercel --prodGET /health
Returns service status and configuration check.
POST /jira-release
Processes Jira webhook payloads and sends Slack notifications.
Expected payload:
{
"issue": {
"key": "PROJECT-123",
"title": "Release Title",
"summary": "Release Summary"
}
}- Go to Project Settings → Automation in your Jira project
- Create a new rule with:
- Trigger: Issue transitioned
- Conditions: From status (In Progress) → To status (Released/Done)
- Action: Send web request
- Method:
POST - URL:
https://your-vercel-deployment.vercel.app/jira-release - Headers:
Content-Type: application/json - Body:
{ "issue": { "key": "{{issue.key}}", "title": "{{issue.summary}}", "summary": "{{issue.summary}}" } } - Method:
Test the webhook locally or in production:
curl -X POST https://your-deployment.vercel.app/jira-release \
-H "Content-Type: application/json" \
-d '{
"issue": {
"key": "TEST-123",
"title": "Test Release",
"summary": "Testing webhook integration"
}
}'├── api/
│ ├── jira-release.js # Main webhook handler
│ └── health.js # Health check endpoint
├── vercel.json # Vercel configuration
├── package.json # Dependencies
├── .env.example # Environment template
└── index.js # Local development server
The service includes comprehensive error handling:
- Input validation
- Jira API error handling
- Slack webhook error handling
- Environment configuration validation
- Detailed logging for debugging
- Environment variables are securely managed
- CORS headers are properly configured
- Input validation prevents injection attacks
- No sensitive data is logged
- Fork the repository
- Create a feature branch
- Make your changes
- Test locally
- Submit a pull request
MIT License - see LICENSE file for details.