Skip to content

ci(release): auto-delete superseded krateoctl-* CRD-sync branches - #89

Open
braghettos wants to merge 1 commit into
mainfrom
ci/crds-sync-supersede-cleanup
Open

ci(release): auto-delete superseded krateoctl-* CRD-sync branches#89
braghettos wants to merge 1 commit into
mainfrom
ci/crds-sync-supersede-cleanup

Conversation

@braghettos

Copy link
Copy Markdown
Collaborator

What

The widget-CRD auto-sync step in release-tag.yaml opens one krateoctl-<tag> PR against krateo-frontend-chart per frontend release, but never cleaned up the previous ones. Result: 71 stale krateoctl-* branches accumulated on the chart repo (from #1–#112; 15 merged, 62 closed-unmerged, 0 open). No schema was ever lost — each PR is a full CRD snapshot, so the latest merged one (krateoctl-1.3.119, #112) subsumes all the intermediates — but the branches piled up.

Change

After the step ensures the current release's PR is open, it now closes every other open krateoctl-* PR with --delete-branch (supersession). Only the newest CRD-sync PR stays open; superseded ones close and their branches are deleted automatically.

  • Current-branch is excluded (filtered in bash, not jq-env).
  • || true so cleanup never fails the release.
  • No behavior change when there are no older open PRs.

Also recommended (one-click, not in this PR)

Enable Settings → General → "Automatically delete head branches" (delete_branch_on_merge: true) on braghettos/krateo-frontend-chart. That covers the merge path; this PR covers the supersession path. Together they stop the pileup for good.

The 71 existing stale branches have already been deleted manually.

🤖 Generated with Claude Code

…branches

The CRD-sync step opens one krateoctl-<tag> PR per release but never cleaned up
older ones, so closed/merged PRs left their head branches behind (71 accumulated).
After ensuring the current PR is open, close every OTHER open krateoctl-* PR with
--delete-branch — each PR is a full CRD snapshot, so the newest subsumes the rest.

Pairs with enabling delete_branch_on_merge on krateo-frontend-chart (covers the
merge path); this step covers supersession.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant