-
Notifications
You must be signed in to change notification settings - Fork 0
⚙️ [Maintenance]: Delete branches of superseded Auto-Update PRs when closing them #155
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
Conversation
Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com>
Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com>
No Significant Changes DetectedThis PR does not contain changes to files that would trigger a new release:
Build, test, and publish stages will be skipped for this PR. If you believe this is incorrect, please verify that your changes are in the correct locations. |
No Significant Changes DetectedThis PR does not contain changes to files that would trigger a new release:
Build, test, and publish stages will be skipped for this PR. If you believe this is incorrect, please verify that your changes are in the correct locations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Updates the Auto-Update maintenance automation so that when a newly created FontsData update PR supersedes older open Auto-Update PRs, the superseded PRs’ branches are also deleted to avoid accumulating stale branches (Fixes #154).
Changes:
- Extends the
gh pr listquery to includeheadRefNamefor each superseded PR. - After closing each superseded PR, attempts to delete its associated branch via the GitHub API (with warning-on-failure behavior).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No Significant Changes DetectedThis PR does not contain changes to files that would trigger a new release:
Build, test, and publish stages will be skipped for this PR. If you believe this is incorrect, please verify that your changes are in the correct locations. |
The Auto-Update workflow now automatically deletes branches associated with superseded PRs when closing them, preventing stale branches from accumulating in the repository.
Branch cleanup for superseded Auto-Update PRs
When the
Update-FontsDataworkflow creates a new Auto-Update PR and closes any superseded open Auto-Update PRs, the associated branches (e.g.,auto-update-20260210-101656) are now also deleted.The PR list query now includes
headRefNameto retrieve branch names, and after closing each superseded PR, the branch is deleted via the GitHub API. The deletion is wrapped in a try-catch block to prevent workflow failures if the branch has already been deleted or permissions are insufficient.