Skip to content

Raghul-M/GitHub-Jira_Automation-Flask-Application

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

GitHub-Jira Automation Flask Web Application

Jira automation

Overview

This GitHub-Jira integration project involves a Flask web application hosted on an AWS EC2 instance. The application automates the creation of Jira issues based on GitHub issue comments. Specifically, when a user comments "/jira" on a GitHub issue, the web application triggers a process that utilizes GitHub webhooks, Jira API automation, and AWS EC2.

How It Works

  1. GitHub Webhooks: Screenshot-from-2023-12-16-01-18-43.png

    • The Flask web application is configured to receive GitHub webhook events.
    • GitHub issues trigger events that contain information about comments, which the application analyzes.
  2. GitHub Issue Comment Processing: Screenshot-from-2023-12-16-01-25-34.png

    • When a comment is made on a GitHub issue, the application checks if it contains the "/jira" command.
  3. Jira API Automation: Screenshot-from-2023-12-16-01-20-57.png

    • If the "/jira" command is detected, the application uses the Jira REST API to create a new issue on the Jira board.
    • Key details such as project, issue type, and summary are included in the API request payload.
  4. AWS EC2 Hosting:

    • The Flask web application is hosted on an AWS EC2 instance.
    • Ensure you have launched an EC2 instance, and you can access it securely.
  5. Setup After Creating EC2 Instance:

    • Connect to your EC2 instance securely using SSH.
    • Run these commands :
         $ sudo apt-get update
         $ sudo apt-get install python3
         $ sudo apt-get install python3-pip
         $ pip install flask
         $ vim your-filename.py
         $ python3 your-filename.py
      Screenshot-from-2023-12-16-01-23-53.png
      • It will initiate the Flask application

Troubleshooting Guide

Problem:

Screenshot-from-2023-12-16-01-32-10.png Webhooks are failing, or the Flask application returns a 500 error.

Possible Causes and Solutions:

  1. Webhooks Configuration:

    • Verify GitHub webhook settings (payload URL, content type, and secret).
  2. Flask Application Logs:

    • Check application logs for errors (commonly in /var/log or the app directory).
  3. EC2 Security Groups:

    • Go to EC2 console > Security Groups.
    • Ensure Inbound Rules allow necessary ports (e.g., 80, 443 , 5000) for GitHub IPs.

Reference Screenshot:

Screenshot-from-2023-12-16-01-27-15.png

Feel free to explore, contribute, and adapt this project to suit your needs. If you encounter any issues or have suggestions for improvement, please raise them in the GitHub repository's issues section. Happy coding! 🚀

Releases

No releases published

Packages

No packages published

Languages