conda-forge / conda-forge/conda-forge.github.io
Branch deletion policy?
- Ngôn ngữ chính
- JavaScript
- Star
- 170
- Fork
- 320
- Merge trung bình
- 2 ngày 10 giờ
- Pull request đã merge (30 ngày)
- 5
Mô tả
Update February 2026:
In general: _**Please do not delete branches**_ on the feedstock. That is because these branches will publish artefacts (assuming CI passes), and that means we need to keep the provenance information of those builds (we do keep this in the package metadata, as can be seen in the [metadata app](https://conda-metadata-app.streamlit.app/?q=conda-forge%2Flinux-64%2Fnumpy-2.4.2-py314hd4f4903_1.conda), under "Provenance"), but it should also be discoverable easily on the feedstock.
For the relatively rare case of feedstocks requiring lots of maintenance branches, this can lead to quite a lot of clutter in the Github UI. To deal with this ,there's now a [new admin-requests type](https://github.com/conda-forge/admin-requests#archive-or-unarchive-a-branch-on-a-feedstock) that allows archiving branches by turning them into tags. Here's the [result](https://github.com/conda-forge/arrow-cpp-feedstock/tags) of archiving a bunch of arrow's old branches in this way. The process is reversible where that's necessary.
This should enable us to protect feedstock branches by default (without forcing enormous clutter on maintainers) at some later point, which would be an important improvement in terms of security posture (currently it's possible to create a branch on a feedstock, have it publish packages to the main channel, and then delete the branch again, which is not good™️). That's still a way away though, because it'll probably need a CFEP.
Implementation (and more details) can be found in https://github.com/conda-forge/admin-requests/pull/1875
In the meantime: Please don't delete branches, but you're welcome to _archive_ them.
---
_Previously:_
I was wondering if we have a policy for deleting branches on a repo, and if not, if we should formulate one, at least in rough strokes.
It's clear that these branches are producing builds, so for auditability and traceability, we generally shouldn't delete things, at least not very eagerly.
But some feedstocks where we keep maintenance branches for older versions have amassed a lot of branches, many of which haven't been built in years, and in such cases, I cannot see what harm it could do to delete them. Additionally, occasionally there are branches that get pushed to a repo +/- accidentally, but remain lying around as cruft.
There's a technique that some repos use when deleting a branch, to leave a tag for the head of that commit. That way, it remains easily discoverable for those who need it.
Thoughts?
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.