Commit d40e4fb
⚙️ [Maintenance]: Delete branches of superseded Auto-Update PRs when closing them (#155)
The Auto-Update workflow now automatically deletes branches associated
with superseded PRs when closing them, preventing stale branches from
accumulating in the repository.
- Fixes #154
## 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.
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com>
Co-authored-by: Marius Storhaug <marstor@hotmail.com>1 parent e3de578 commit d40e4fb
1 file changed
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
| 164 | + | |
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
184 | 198 | | |
185 | 199 | | |
186 | 200 | | |
| |||
0 commit comments