8000
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/copilot-maintenance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
description: 'Maximum number of branches to delete'
required: false
type: number
default: 1
default: 10

permissions:
contents: write
Expand Down Expand Up @@ -73,16 +73,16 @@ jobs:
- name: Run copilot branch cleanup script
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAX_BRANCHES: ${{ github.event.inputs.max_branches || '1' }}
MAX_BRANCHES: ${{ github.event.inputs.max_branches || '10' }}
run: |
echo "Running copilot branch cleanup script..."
./scripts/delete-old-copilot-branches.sh

Comment on lines 73 to 80
Copy link
Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

The scheduled run now executes both “Run copilot branch cleanup script” and “Execute deletion commands”, which calls delete-old-copilot-branches.sh twice. Since the script makes per-branch gh pr list calls, this doubles API usage and runtime on the daily cron and increases the chance of hitting rate limits. Consider skipping the first step when github.event_name == 'schedule' (or when deletion will run), or refactor to run the script once and reuse its output for deletion.

Copilot uses AI. Check for mistakes.
- name: Execute deletion commands
if: github.event.inputs.delete_branches == 'true'
if: github.event.inputs.delete_branches == 'true' || github.event_name == 'schedule'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAX_BRANCHES: ${{ github.event.inputs.max_branches || '1' }}
MAX_BRANCHES: ${{ github.event.inputs.max_branches || '10' }}
run: |
echo "Executing deletion commands..."
./scripts/delete-old-copilot-branches.sh | \
Expand All @@ -95,7 +95,7 @@ jobs:
echo "✓ Copilot branch cleanup completed"

- name: Preview mode notice
if: github.event.inputs.delete_branches != 'true'
if: github.event.inputs.delete_branches != 'true' && github.event_name != 'schedule'
run: |
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "⚠️ PREVIEW MODE - No branches were deleted"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/slide-deck-maintainer.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/stale-repo-identifier.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
0