Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Feb 10, 2026

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-FontsData workflow 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 headRefName to 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.

Copilot AI and others added 2 commits February 10, 2026 10:43
Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com>
Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com>
Copilot AI changed the title [WIP] Delete branches of superseded Auto-Update PRs when closing them Delete branches when closing superseded Auto-Update PRs Feb 10, 2026
Copilot AI requested a review from MariusStorhaug February 10, 2026 10:45
@MariusStorhaug MariusStorhaug changed the title Delete branches when closing superseded Auto-Update PRs ⚙️ [Maintenance]: Delete branches of superseded Auto-Update PRs when closing them Feb 10, 2026
@MariusStorhaug MariusStorhaug added the NoRelease Do not create a release label Feb 10, 2026
@github-actions
Copy link
Contributor

No Significant Changes Detected

This PR does not contain changes to files that would trigger a new release:

Path Description
src/** Module source code
README.md Documentation

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.

@MariusStorhaug MariusStorhaug marked this pull request as ready for review February 10, 2026 11:07
Copilot AI review requested due to automatic review settings February 10, 2026 11:07
@github-actions
Copy link
Contributor

No Significant Changes Detected

This PR does not contain changes to files that would trigger a new release:

Path Description
src/** Module source code
README.md Documentation

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.

Copy link

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

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 list query to include headRefName for 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.

@github-actions
Copy link
Contributor

No Significant Changes Detected

This PR does not contain changes to files that would trigger a new release:

Path Description
src/** Module source code
README.md Documentation

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.

@MariusStorhaug MariusStorhaug merged commit d40e4fb into main Feb 10, 2026
29 checks passed
@MariusStorhaug MariusStorhaug deleted the copilot/delete-superseded-pr-branches branch February 10, 2026 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

NoRelease Do not create a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Delete branches of superseded Auto-Update PRs when closing them

2 participants