This project is a Python-based serverless API that automates the creation of Jira tickets from GitHub issues. When authorized users comment /jira on an issue, a corresponding Jira ticket is created with relevant metadata and context. This saves time and streamlines your workflow.
- Authenticated comment-based trigger (
/jira) - GitHub issue to Jira ticket sync
- Automatic triage logic based on labels and issue content
- Modular structure for easy extension
src/
- automated_triage.py - Logic to prioritize and route tickets
- create_ticket.py - Jira ticket creation and field mapping
- fetch_projects.py - Fetch available Jira projects and types
- issuetypes.py - Maps issue types and project keys
- jira_authentication.py - OAuth or API token-based Jira auth
- A user comments
/jiraon a GitHub issue - The serverless API:
- Verifies the user is authorized
- Extracts issue title, description, and labels
- Determines the target project and issue type
- Creates a Jira ticket using the Jira API
- The ticket ID is posted as a comment on the original GitHub issue
- Python 3.9+
- Jira Cloud account with API token
- GitHub repository with webhook/event listener
requirements.txt:
requests
fastapi
uvicorn
python-dotenv
- Uses environment variables and token-based authentication
- Can be extended with HMAC signature checks from GitHub webhooks
- AWS Lambda with API Gateway
- Docker container (Dockerfile provided)
- Serverless Framework or Terraform
POST /github-event-webhook
{
"action": "created",
"comment": {
"body": "/jira",
"user": {
"login": "authorized-contributor"
}
},
"issue": {
"title": "Login button not working",
"body": "Steps to reproduce...",
"labels": ["bug", "frontend"]
}
}Ayush Poudel (https://github.com/ayuspoudel)
- Slack notifications on ticket creation
- Auto-assign based on GitHub assignee
- Error logging and observability with Prometheus