Skip to content

Chintanpatel24/Prexec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

105 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ A Python tool to check all Pull Requests created by a GitHub user across all their repositories.

Python License No Dependencies


πŸ“‹ Table of Contents


πŸ–ΌοΈ GUI


✨ Features

βœ… Zero Dependencies Uses only Python standard library
βœ… No API Token Required Works without authentication
βœ… Comprehensive Statistics Shows merged, pending, and closed PRs
βœ… All Repositories Scans across all user's repositories
βœ… Detailed Reports Optional detailed PR list with links
βœ… Easy to Use Simple command-line interface

πŸ“¦ Prerequisites

Requirement Description
🐍 Python Version 3.6 or higher
🌐 Internet Active connection
πŸ‘€ GitHub Username Valid username to check

That's it! No additional packages needed.


Optional requirement (mandatory to Generate Graphs)

Installing Matplotlib :

  • Matplotlib is a popular Python library for creating static, animated, and interactive visualizations.
  • Here's how to install it:

Method 1: Using pip (Recommended)

  1. The simplest way is to use pip, Python's package manager:
pip install matplotlib
  1. If you're using Python 3 specifically,you might need:
pip3 install matplotlib
  1. For Windows:
python -m pip install --upgrade pip

Method 2: Using conda

  1. If you're using Anaconda or Miniconda, use conda instead:
conda install matplotlib

Verifying the Installation

  • After installation, verify it worked by opening Python and importing the library:
import matplotlib.pyplot as plt
print(matplotlib.__version__)
  • If no error appears and a version number prints, the installation was successful.

Additional Setup Notes :

  1. Virtual Environments (Recommended)
  • It's best practice to install packages in a virtual environment to avoid conflicts:
python -m venv myenv
source myenv/bin/activate  # On Windows: myenv\Scripts\activate
pip install matplotlib
  1. System Dependencies
  • On some Linux systems, you might need system libraries first. For example, on Ubuntu/Debian:
sudo apt-get install python3-matplotlib
  1. if using pip, ensure you have the development headers:
sudo apt-get install python3-dev
pip install matplotlib

πŸ”§ Installation

Method 1: Using One-Line Install & Run:

# For linux & MAC
curl -O https://raw.githubusercontent.com/Chintanpatel24/Prexec/main/Prexec.py && python3 Prexec.py
# For Windows PowerShell
Invoke-WebRequest -Uri https://raw.githubusercontent.com/Chintanpatel24/Prexec/main/Prexec.py -OutFile Prexec.py; python Prexec.py

Method 2: Clone the Repository

# Clone this repository
git clone https://github.com/Chintanpatel24/Prexes.git

# Navigate to the directory
cd Prexec

# Run the script
python3 Prexec.py

Method 3: Download Directly

  1. Download Prexec.py from this repository
  2. Save it to your desired location
  3. Run it with Python
python Prexec.py

Method 4: Quick Download (Using wget or curl)

  1. Using wget:
# Download the script
wget https://raw.githubusercontent.com/Chintanpatel24/Prexec/main/Prexec.py

# Run it
python3 Prexec.py
  1. Using curl:
# Download the script
curl -O https://raw.githubusercontent.com/Chintanpatel24/Prexec/main/Prexec.py

# Run it
python3 Prexec.py

πŸ”‘ Optional: Setup GitHub Token

  • For higher API limits (5000 requests/hour instead of 60):

Step 1: Create a Personal Access Token at GitHub Settings

Step 2: Create a .env file in the same directory:

GITHUB_TOKEN=your_token_here

Step 3: The script will automatically detect and use it


πŸ“ˆ Demo Graph


πŸš€ Usage

  • Starting the Tool
cd Prexec
python3 Prexec.py
  • Everything is a command based !!
  • Main Menu


⚠️ Limitations

πŸ”„ GitHub API Rate Limits

Authentication Rate Limit Resets After
❌ Without Token 60 requests/hour 1 hour
βœ… With Token 5,000 requests/hour 1 hour

πŸ› οΈ Troubleshooting

Issue Solution
python: command not found Use python3 check_pr.py instead
HTTP Error 403: rate limit exceeded Wait 1 hour or add GitHub token
HTTP Error 404: Not Found Check if username/repo exists
Shows 0 PRs User has no PRs or repos are private
Script freezes User has many repos; wait for completion
ModuleNotFoundError Ensure Python 3.6+ is installed
  • Debug Mode:
# Run with output logging
python Prexec.py 2>&1 | tee output.log

πŸ“Š Example Output


🀝 Contributing

Contributions are welcome! πŸŽ‰

  • How to Contribute:
# 1. Fork the repository
# 2. Clone your fork
git clone https://github.com/Chintanpatel24/c-pr.git

# 3. Create a feature branch
git checkout -b feature/AmazingFeature

# 4. Make your changes
# 5. Commit your changes
git commit -m "Add some AmazingFeature"

# 6. Push to the branch
git push origin feature/AmazingFeature

# 7. Open a Pull Request

πŸ’‘ Ideas for Contributions:

  1. Add support for GitHub Organizations
  2. Export to Excel format
  3. Create a GUI version
  4. Add data visualization (charts/graphs)
  5. Filter PRs by date range
  6. Add progress bar for large scans
  7. Multi-threading for faster scanning
  8. Add unit tests
  9. Create Docker container
  10. Add webhook support for real-time tracking

πŸ“‹ Contribution Guidelines:

  1. Follow PEP 8 style guide
  2. Add comments for complex logic
  3. Update README for new features
  4. Keep dependencies minimal (preferably zero)
  5. Test on Python 3.6+

πŸ”‘ Key Features Added

1.

--- PR Type Detection (12 types) ---
πŸ› Bug Fix ✨ Feature πŸ“¦ Dependency
πŸ“š Documentation ♻️ Refactor πŸ§ͺ Test
⚑ Performance 🎨 Style/Lint 🌐 Translation
πŸ”§ Config πŸ”’ Security πŸ—‘οΈ Deprecation

2.

--- Tool Detection (16+ tools) ---
πŸ–₯️ GitHub Web πŸ’» GitHub CLI (gh) πŸ”§ Git CLI + API
πŸ€– Dependabot πŸ”„ Renovate Bot πŸ›‘οΈ Snyk Bot
πŸ’œ VS Code 🧠 JetBrains IDE βš™οΈ GitHub Actions

3. Productivity/Brain Power Chart :

  • Profit-Loss style chart
  • Based on time between PRs
  • Factors: PR frequency, acceptance rate, consistency
  • Shows upward trend (high productivity) or downward trend (low productivity)
  • Color-coded: Green = Profit Zone, Red = Loss Zone

4. Graph Output :

  • Saved as your-graph-by-cp.png
  • Dark theme with gradient effects
  • 6 different visualizations including the productivity chart

5. Loop-Based Menu :

  • Returns to main menu after each operation
  • Only exits when user selects option 4

6. Properly Aligned Tables :

  • All β•‘ borders are consistent
  • Fixed width formatting

πŸ”— Quick Links

Resource Link
πŸ“– GitHub API Docs docs.github.com/en/rest
🐍 Python Download python.org/downloads
πŸ”‘ Create GitHub Token github.com/settings/tokens
πŸ“š Pull Request Guide docs.github.com/en/pull-requests

Releases

No releases published

Packages

 
 
 

Contributors