A simple one-page application to track and monitor GitHub Pull Request readiness status.
Deploy this application to Cloudflare Workers with one click:
The deploy button will automatically:
- Create a new Cloudflare Workers project
- Provision a D1 database
- Initialize the database schema
- Deploy the application
No manual configuration required!
BLT-Leaf/
├── public/ # Static assets served by Cloudflare Workers
│ └── index.html # Main frontend application
├── src/ # Backend Python code
│ └── index.py # Cloudflare Worker main handler
├── schema.sql # Database schema for D1
├── wrangler.toml # Cloudflare Workers configuration
├── package.json # npm scripts for deployment
├── DEPLOYMENT.md # Detailed deployment instructions
└── README.md # This file
- 📝 Track PRs: Add GitHub PR URLs to track their status
- 📊 Detailed Metrics: View merge status, files changed, check results, and review status
- 👥 Multi-Repo Support: Track PRs across multiple repositories
- 🔄 Real-time Updates: Refresh PR data from GitHub API
- 🎨 Clean Interface: Simple, GitHub-themed UI with no external frameworks
- Frontend: Single HTML page with vanilla JavaScript (no frameworks)
- Backend: Python on Cloudflare Workers
- Database: Cloudflare D1 (SQLite)
- Styling: Embedded CSS with GitHub-inspired theme
- Wrangler CLI
- Cloudflare account
- Clone the repository:
git clone https://github.com/OWASP-BLT/BLT-Leaf.git
cd BLT-Leaf- Install Wrangler (if not already installed):
npm install -g wrangler- Login to Cloudflare:
wrangler login- Create the D1 database:
wrangler d1 create pr_tracker-
Update
wrangler.tomlwith your database ID from the previous step. -
Initialize the database schema:
wrangler d1 execute pr_tracker --file=./schema.sqlRun the development server:
wrangler devThe application will be available at http://localhost:8787
Deploy to Cloudflare Workers:
wrangler deploy- Add a PR: Enter a GitHub PR URL in the format
https://github.com/owner/repo/pull/number - View Details: See comprehensive PR information including:
- Current state (Open/Closed/Merged)
- Merge readiness
- Files changed count
- Check status (passed/failed/skipped)
- Review approval status
- Time since last update
- Author information
- Filter by Repo: Click on a repository in the sidebar to filter PRs
- Refresh Data: Use the refresh button to update PR information from GitHub
GET /- Serves the HTML interfaceGET /api/repos- List all repositories with PRsGET /api/prs- List all PRs (optional?repo=owner/namefilter)POST /api/prs- Add a new PR (body:{"pr_url": "..."})POST /api/refresh- Refresh a PR's data (body:{"pr_id": 123})
The application uses a single table:
CREATE TABLE prs (
id INTEGER PRIMARY KEY AUTOINCREMENT,
pr_url TEXT NOT NULL UNIQUE,
repo_owner TEXT NOT NULL,
repo_name TEXT NOT NULL,
pr_number INTEGER NOT NULL,
title TEXT,
state TEXT,
is_merged INTEGER DEFAULT 0,
mergeable_state TEXT,
files_changed INTEGER DEFAULT 0,
author_login TEXT,
author_avatar TEXT,
checks_passed INTEGER DEFAULT 0,
checks_failed INTEGER DEFAULT 0,
checks_skipped INTEGER DEFAULT 0,
review_status TEXT,
last_updated_at TEXT,
created_at TEXT DEFAULT CURRENT_TIMESTAMP,
updated_at TEXT DEFAULT CURRENT_TIMESTAMP
);The application uses the GitHub REST API to fetch PR information. No authentication is required for public repositories, but rate limits apply (60 requests per hour for unauthenticated requests).
For private repositories or higher rate limits, you can add a GitHub token to the worker environment variables.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is part of the OWASP Bug Logging Tool (BLT) project.