github“自动删除头部分支”用于多个存储库

发布于 2025-01-28 17:08:06 字数 344 浏览 3 评论 0原文

在GitHub上,我们可以在合并后的存储库后自动删除分支(如说明在这里)。我想在30个存储库中这样做。 有没有办法通过脚本执行此操作? 我通常想在每个存储库中添加一个文件。

On Github we can set automatically deletion of branches after merge for a repository (like explained here). I want to do this for 30 repositories.
Is there a way to do this by script ?
I typically would like to add a file to each repository.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

九厘米的零° 2025-02-04 17:08:06

我认为您可以通过脚本相对轻松地完成此操作。您可以使用 github cli 为此。有 plost command 您可以在成功的Merge之后删除分支的删除对于一个存储库:

gh repo edit [<repository>] --delete-branch-on-merge

如果您想从CLI开始。

I think you can do this relatively easily with a script. You can use the GitHub CLI for this. There is the following command with which you can switch on the deletion of the branch after a successful merge for a repository:

gh repo edit [<repository>] --delete-branch-on-merge

If you want to start with the CLI, I guess this is a good starting point.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文