This app runs inside the BotSurf browser. Don't have it yet? Get the app or extension now!

Bitbucket PR Age Highlighter

Developer Tools · All
0 installs · Verified BotGentz app
Launch App
Opens in BotSurf — try it free, no account needed.
CategoryDeveloper Tools
PlatformAll
Pricing Free
Installs0
Download BotSurf to use — free
No account needed for free apps. Once BotSurf is open, find this app in Apps from the + menu.

About this app

WHAT IT DOES

Bitbucket PR Age Highlighter scans Bitbucket pull request pages and highlights each PR based on how long it has been open. Green indicates recent PRs (under 1 day), yellow for moderate (1-3 days), orange for aging (3-7 days), and red for old PRs (over 7 days). Each PR card gets a colored left border and a subtle background tint, making it easy to spot stale PRs at a glance. Age badges show the exact age (e.g., "2.3d" or "14h") next to each PR title, and tooltips display the creation time and exact age on hover. A summary panel shows total PR count, average age, oldest PR age, and a breakdown of PRs by age category. You can also sort PRs by age to bring the oldest PRs to the top. This is perfect for identifying stale PRs that need attention, reviewing team velocity, and managing code review backlogs.

WHERE IT RUNS

This script runs on Bitbucket pull request pages (*.bitbucket.org/*). It operates entirely within your browser tab, reading the page's DOM to locate PR cards, extract creation times, and apply highlighting. The script cannot access other tabs, your browsing history, bookmarks, downloads, or any data outside the current page. All settings—including age thresholds, highlight colors, age badge visibility, sort preference, and auto-analyze preference—are stored locally using GM_setValue and never transmitted anywhere.

HOW TO USE

After installing with the BotGentz extension, the script automatically analyzes PRs on Bitbucket pages you view (if auto-analyze is enabled). The panel shows a summary with total PRs, average age, oldest PR, and a breakdown by age category. Each PR card is color-coded with a left border and subtle background. Age badges appear next to PR titles showing the age in days or hours. Hover over any PR to see its exact creation time and age. Click "Analyze PRs" to manually trigger analysis if auto-analyze is off. Adjust age thresholds in the settings to customize what counts as "Recent," "Moderate," "Aging," and "Old." Change highlight colors to match your preferences. Toggle age badges on or off, enable or disable sorting by age, and copy a full PR age report to your clipboard.

THE REAL MECHANISM

The script detects PR cards using multiple selectors (.pr-card, .pull-request-item, [data-testid="pr-card"], .aui-card) to handle different Bitbucket UI versions. For each PR card, it extracts the creation time from time elements (datetime attribute) or parses relative date strings like "2 days ago." The age is calculated as the difference between the current time and the creation time, expressed in hours and days. Based on user-configurable thresholds (defaults: 1, 3, 7 days), each PR is assigned to one of four categories: Recent, Moderate, Aging, or Old. Highlighting is applied by setting a left border color and a subtle background tint on each PR card. Age badges are inserted next to the PR title, and tooltips are added to PR cards. If sorting is enabled, the PR cards are reordered in the DOM from oldest to newest. The summary panel aggregates statistics across all PRs found on the page. All DOM manipulation uses safe methods with no innerHTML from untrusted content.

THE PANEL

The PR Age Highlighter panel is a BGPanel component that you can drag anywhere on your screen by its header. It snaps to the nearest edge when released, keeping your workspace organized. The panel collapses to a small bubble showing only the emoji icon when minimised—click to expand it again. You can resize the panel horizontally to see more of the summary and settings. Press the Escape key to collapse the panel instantly. Your panel position and size are saved per-site.

PLEASE NOTE

This script requires the free BotGentz browser extension to function. Bitbucket frequently updates its UI, which may change class names, data-testid attributes, and DOM structure—the script may require updates to maintain compatibility. The extraction of creation times relies on time elements or relative date strings; if the page uses a different format, the script may not detect some PRs. The sorting feature rearranges DOM elements on the page, which may affect other scripts or browser extensions that interact with PR cards. The script never reads or writes password fields, hidden inputs, or file inputs. It stores only your age thresholds, highlight colors, age badge visibility, sort preference, and auto-analyze preference locally. No PR data, repository information, or personal information is ever collected, transmitted, or shared.

Similar Apps

Log in to BotGentz

Suggest an App

Tell us what you'd find useful — if we build it, we'll email you the moment it's ready.