This project connects GitHub issue comments to Jira using a lightweight Flask API hosted on AWS EC2.
Whenever a user comments /jira on a GitHub issue, a new Jira ticket is automatically created with all relevant details.
- Listens to GitHub webhooks for
issue_commentevents - Creates Jira issues automatically when
/jirais detected in a comment - Environment-based credentials using
.envfor security - Deployed on AWS EC2 with Python virtual environment
- Supports both local and cloud testing
- GitHub sends a webhook payload when someone comments on an issue.
- Flask receives the payload at
/createJira. - If the comment starts with
/jira, the app creates a new Jira issue via REST API. - The Jira issue description includes the original comment and GitHub issue link.
- Python 3.10+
- Flask for webhook handling
- Requests for REST API calls
- Jira Cloud REST API
- GitHub Webhooks
- AWS EC2 (Ubuntu) for hosting
- python-dotenv for secret management
Create a .env file in your project root:
JIRA_EMAIL=your_email@example.com
JIRA_API_TOKEN=your_jira_api_token
JIRA_PROJECT_KEY=SCRUM
# Create a virtual environment
python3 -m venv venv
source venv/bin/activate
# Install dependencies
pip install flask requests python-dotenv
# Run the Flask app
python github_jira_ticket.pyThen open your browser or cURL:
http://localhost:5000/createJiraLaunch an Ubuntu EC2 instance
SSH into it using your .pem key
Clone this repository
Set up your virtual environment:
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txtRun:
python github_jira_ticket.py
Open port 5000 in your EC2 security group inbound rules
Add the EC2 public URL to your GitHub Webhook settings