Skip to content

Workflow to Cleanup Branches#565

Merged
LukasWallrich merged 15 commits intomasterfrom
cleanup_br
Feb 11, 2026
Merged

Workflow to Cleanup Branches#565
LukasWallrich merged 15 commits intomasterfrom
cleanup_br

Conversation

@richarddushime
Copy link
Contributor

@richarddushime richarddushime commented Dec 22, 2025

Description

Fixes #542
an automated workflow to keep the repository clean by removing old and stale branches.

Staging Aggregate Branches: Keeps only the latest 2 staging-aggregate-* branches.
Merged Branches: Deletes any branch that has been merged into master (excluding protected branches like staging etc.).
Stale Branches: Deletes any branch with no activity for 1 months.
Safety Check: Branches with OPEN PRs are automatically skipped, even if stale.

1. Auto-Generated Branch Cleanup

  • Removes old ga-data-update-* branches (keeps 1 most recent)
  • Removes old staging-aggregate-* branches (keeps 2 most recent)
  • Deletes branches with no commits for 1+ month AND no open PR
  • dry_run option for testing (doesn't delete, just reports)

Type of Change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • Tested Locally
  • Manual review / previewed on staging.forrt.org content/webpage changes
  • Not Tested yet

Checklist for Developers:

  • I have attempted to stay aligned to related code in this repository rather than reinventing the wheel.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.

Additional Notes

@github-actions github-actions bot added the cicd Relevant to GitHub workflows label Dec 22, 2025
@github-actions
Copy link
Contributor

👍 All image files/references (if any) are in webp format, in line with our policy.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds an automated workflow to clean up stale and old branches in the repository to maintain repository hygiene. The workflow runs weekly on Sundays and can also be triggered manually with a dry-run option.

Changes:

  • Adds a new GitHub Actions workflow file that performs three types of branch cleanup: old staging-aggregate branches (keeping only 10 most recent), merged branches (already merged into master), and stale branches (no activity for 6 months with no open PRs)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

LukasWallrich and others added 2 commits January 21, 2026 16:33
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions
Copy link
Contributor

✅ Spell Check Passed

No spelling issues found in this PR! 🎉

@github-actions
Copy link
Contributor

✅ Spell Check Passed

No spelling issues found in this PR! 🎉

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions
Copy link
Contributor

✅ Spell Check Passed

No spelling issues found in this PR! 🎉

@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2026

✅ Spell Check Passed

No spelling issues found in this PR! 🎉

@forrtproject forrtproject deleted a comment from Copilot AI Feb 5, 2026
@richarddushime
Copy link
Contributor Author

On hold
I will fix it once this #617 is merged because there is some potential conflicts

@LukasWallrich
Copy link
Contributor

Aggressively remove ga and staging branches - but with careful pattern matching

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions
Copy link
Contributor

✅ Spell Check Passed

No spelling issues found in this PR! 🎉

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions
Copy link
Contributor

✅ Spell Check Passed

No spelling issues found in this PR! 🎉

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions
Copy link
Contributor

✅ Spell Check Passed

No spelling issues found in this PR! 🎉

@richarddushime richarddushime marked this pull request as ready for review February 10, 2026 16:09
@richarddushime richarddushime requested a review from a team as a code owner February 10, 2026 16:09
@github-actions
Copy link
Contributor

✅ Spell Check Passed

No spelling issues found in this PR! 🎉

@LukasWallrich
Copy link
Contributor

LukasWallrich commented Feb 10, 2026

Staging Deployment Status

This PR has been successfully deployed to staging as part of an aggregated deployment.

Deployed at: 2026-02-10 19:52:25 UTC
Staging URL: https://staging.forrt.org

The staging site shows the combined state of all compatible open PRs.

@github-actions
Copy link
Contributor

✅ Spell Check Passed

No spelling issues found in this PR! 🎉

@github-actions
Copy link
Contributor

✅ Spell Check Passed

No spelling issues found in this PR! 🎉

@github-actions
Copy link
Contributor

✅ Spell Check Passed

No spelling issues found in this PR! 🎉

@richarddushime
Copy link
Contributor Author

@LukasWallrich I went deeply and also removed some branches that were mentioned in the workflows as protected like main, production , because we do not use them anyways

Now Good to Go

@github-actions
Copy link
Contributor

✅ Spell Check Passed

No spelling issues found in this PR! 🎉

@LukasWallrich LukasWallrich merged commit f15a803 into master Feb 11, 2026
4 checks passed
@LukasWallrich LukasWallrich deleted the cleanup_br branch February 11, 2026 16:25
@github-actions
Copy link
Contributor

✅ Spell Check Passed

No spelling issues found in this PR! 🎉

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

Labels

cicd Relevant to GitHub workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clean up branches

2 participants