Skip to content

arkaslittlemind/Python-Jira-Integration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🧩 GitHub → Jira Automation (Flask + AWS EC2)

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.


🚀 Features

  • Listens to GitHub webhooks for issue_comment events
  • Creates Jira issues automatically when /jira is detected in a comment
  • Environment-based credentials using .env for security
  • Deployed on AWS EC2 with Python virtual environment
  • Supports both local and cloud testing

🧠 How It Works

  1. GitHub sends a webhook payload when someone comments on an issue.
  2. Flask receives the payload at /createJira.
  3. If the comment starts with /jira, the app creates a new Jira issue via REST API.
  4. The Jira issue description includes the original comment and GitHub issue link.

⚙️ Tech Stack

  • 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

🧩 Environment Variables

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

▶️ Running Locally

# 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.py

Then open your browser or cURL:

http://localhost:5000/createJira

☁️ Deploying on AWS EC2

Launch 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.txt

Run:

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

Workflow -

af88fa17-454d-4ca8-a55a-3ec315fdd293

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages