如何通过 API 启用 Bitbucket 分支模型继承?

发布于 2025-01-11 03:10:54 字数 238 浏览 4 评论 0原文

在 bitbucket 界面中,有一个切换按钮,您可以单击该切换按钮从存储库的项目组设置继承项目顶层的分支策略。我有超过 100 个需要经历的事情。是否可以调用 REST API 来设置它?

切换按钮.

In the bitbucket interface, there is a toggle that you can click to inherit branching strategies at the top level for a project from the repository's project group settings. I have over 100 of these I need to go through. Is there a call to the REST API that I can make that would set it?

the toggle.

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

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

发布评论

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

评论(1

向日葵 2025-01-18 03:10:54

我一直在寻找相同的解决方案,但 API 似乎尚未涵盖此功能。

我尝试了所有 API 调用/参数,试图发现正确的变量。即使从 Web UI 检查有效负载,但遗憾的是没有运气。我想我们只需要等待......或者循环遍历每个存储库并应用相同的配置。

目前使用此 API 端点时会产生副作用。如果存储库从其项目继承分支模型设置,则更新此存储库的分支模型将禁用项目设置继承
我们已弃用此副作用,并将于2022 年 8 月 1 日将其删除。

https://developer.atlassian.com/cloud/bitbucket/rest/api-group-branching-model/#api-repositories-workspace-repo-slug-branching-model-settings-put

I've been looking for a same solution, but it appears the API doesn't cover this functionality (yet).

I've played around with all manor of API calls/parameters in an attempt to discover the right variable. Even inspecting the payload from the web UI but sadly no luck. I think we're just gonna have to wait.. that or loop through each repo and apply the same configuration.

There is currently a side effect when using this API endpoint. If the repository is inheriting branching model settings from its project, updating the branching model for this repository will disable the project setting inheritance.
We have deprecated this side effect and will remove it on 1 August 2022.

https://developer.atlassian.com/cloud/bitbucket/rest/api-group-branching-model/#api-repositories-workspace-repo-slug-branching-model-settings-put

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