Skip to content

Add branch analysis tool for identifying outdated branches#274

Draft
Copilot wants to merge 5 commits intomainfrom
copilot/review-outdated-branches
Draft

Add branch analysis tool for identifying outdated branches#274
Copilot wants to merge 5 commits intomainfrom
copilot/review-outdated-branches

Conversation

Copy link
Contributor

Copilot AI commented Nov 5, 2025

Repository has 260 branches with no systematic way to identify which should be closed. Implemented automated analysis tool to categorize branches by age and merge status.

Implementation

  • Analysis script (scripts/analyze-branches.js)

    • Fetches all remote branches
    • Categorizes into 5 priority groups: merged, stale (90+ days), outdated (60+ days), work-in-progress (30-90 days), recent (< 30 days)
    • Calculates days since last commit and divergence from main
    • Generates markdown report with deletion instructions
  • npm command: npm run branches:analyze

  • Documentation

    • BRANCH_MANAGEMENT.md - Usage guide, deletion guidelines, maintenance checklist
    • BRANCH_ANALYSIS_REPORT.md - Auto-generated report (current: 21 stale, 155 WIP, 83 recent)
    • BRANCH_ANALYSIS_IMPLEMENTATION.md - Technical overview
  • README updates - Added useful scripts section and maintenance tool reference

Usage

$ npm run branches:analyze

Quick Summary:
  - Merged (can delete): 0
  - Stale (90+ days): 21
  - Outdated (60+ days): 0
  - Work in progress: 155
  - Recent: 83

See BRANCH_ANALYSIS_REPORT.md for detailed information.

Report includes branch name, last commit date, age, commits behind main, and subject line for each branch.

Original prompt

I don't know which branches should be closed out as out of date or not


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@netlify
Copy link

netlify bot commented Nov 5, 2025

Deploy Preview for sprightly-genie-998c07 failed. Why did it fail? →

Name Link
🔨 Latest commit 5a24d6f
🔍 Latest deploy log https://app.netlify.com/projects/sprightly-genie-998c07/deploys/690bc84d98a87300080b02e7

Copilot AI and others added 4 commits November 5, 2025 21:47
Co-authored-by: DHCross <45954119+DHCross@users.noreply.github.com>
Co-authored-by: DHCross <45954119+DHCross@users.noreply.github.com>
Co-authored-by: DHCross <45954119+DHCross@users.noreply.github.com>
Co-authored-by: DHCross <45954119+DHCross@users.noreply.github.com>
Copilot AI changed the title [WIP] Review and close out-of-date branches Add branch analysis tool for identifying outdated branches Nov 5, 2025
Copilot AI requested a review from DHCross November 5, 2025 21:57
@DHCross
Copy link
Owner

DHCross commented Jan 28, 2026

Closing draft PR - branch analysis utility can be recreated if needed. The report generated is useful for reference but the PR itself is stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants