Skip to content

Add a github action to remove old branches #27906

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 11, 2025
Merged

Add a github action to remove old branches #27906

merged 2 commits into from
Jun 11, 2025

Conversation

YanaXu
Copy link
Contributor

@YanaXu YanaXu commented Jun 10, 2025

Description

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • Update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

@Copilot Copilot AI review requested due to automatic review settings June 10, 2025 03:50
Copy link

Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status.

Copy link
Contributor

@Copilot 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 introduces a new GitHub Actions workflow to automatically delete old Daily/Release_* branches older than 30 days, triggered on a schedule and via manual dispatch.

  • Adds a clean-branches.yml workflow with daily cron and manual dispatch triggers
  • Implements a PowerShell script that lists all branches matching Daily/Release_\d{14}, parses their embedded timestamp, and deletes those older than 30 days
  • Uses GH CLI to fetch repository info and perform branch deletions

@Azure Azure deleted a comment from Copilot AI Jun 10, 2025
@Azure Azure deleted a comment from Copilot AI Jun 10, 2025
@isra-fel
Copy link
Member

LGTM as long as we clear comments from copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@YanaXu YanaXu enabled auto-merge (squash) June 10, 2025 10:23
Copy link
Contributor

@vidai-msft vidai-msft left a comment

Choose a reason for hiding this comment

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

LGTM

@YanaXu YanaXu merged commit 8f34583 into main Jun 11, 2025
12 checks passed
@isra-fel isra-fel deleted the yanxu/removebranches branch June 11, 2025 05:29
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.

3 participants