Open primeos opened 3 years ago
In the project settings there is "Automatically delete head branches" which may also work. Description is "After pull requests are merged, you can have head branches deleted automatically." and it notes "Deleted branches will still be able to be restored."
In the project settings there is "Automatically delete head branches" which may also work. Description is "After pull requests are merged, you can have head branches deleted automatically." and it notes "Deleted branches will still be able to be restored."
This won't work because there are branches which would briefly (multiple hours) be head branches, but have PRs targeted against them, like haskell-updates
. Deleting such a branch results in all PRs targeted against it being deleted.
I marked this as stale due to inactivity. → More info
i've been removing the merged branches manually using https://github.com/NixOS/nixpkgs/branches/all?query=backport
It would be nice if the GitHub action for backports would automatically delete branches in NixOS/nixpkgs after merging or closing PRs (or if we had another GH action that deletes old
backport-*
branches without an open PR). It might also be desirable to create the branches in a different repository (that way the backport action might not even need write access to Nixpkgs).Initially I didn't know that I had to delete these branches manually (https://github.com/NixOS/nixpkgs/pull/127458#issuecomment-865003289) but even if one knows this it requires an additional manual step that might be easy to miss once in a while.
Ideally https://github.com/zeebe-io/backport-action would handle this and GitHub would offer a PR setting to delete the source branch after merging (like GitLab does: https://docs.gitlab.com/ee/user/project/merge_requests/getting_started.html#deleting-the-source-branch). Since that's unlikely to happen anytime soon we could write a GitHub action that runs periodically and deletes all branches matching
backport-[0-9]+-to-release-[0-9]{2}\.[0-9]{2}
that are associated with a merged PR (or something like that).