一千萬個為什麽

搜索

如何一次更新所有Bitbucket存儲庫問題?


Background: There are multiple Bitbucket Repository Issues (BRI). If an issue needs to be edited then an edit button could be clicked and several items, e.g. title and priority could be changed. This works well when some issues need to be changed, but when more than 250 issues need to be changed this approach is tedious.

Aim: to update all BRI at once.

Method: The current method is to update the issues manually, but when multiple issues need to be updated then it is time consuming. Another approach could be using the API.

Consulting the API: curl -X POST -u "" https://api.bitbucket.org/2.0/repositories///issues? did not return any issues.

為了更新所有問題,嘗試了以下內容:

curl -H "Authorization: Bearer " https://api.bitbucket.org/2.0/repositories///issues -d "priority=trivial" -X POST

而不是更新所有BRI,返回:

{"type": "error", "error": {"fields": {"title": "required key not provided"}, "message": "Bad request"}}

Discussion: As mentioned in the method section, perhaps the API could be used to close all BRI at once, but according to the API documentation there seems to be no update option.

enter image description here

Why create this Q&A on DevOps?: The reason is that the ultimate goal is to close an issue in bitbucket by Jenkins when a pull request has been merged. If updating issues using the API works then that will hopefully work as well.

Conclusion/question: It is possible to update all BRI at once?

最佳答案

目前似乎無法使用API​​一次性更新所有問題,因此此問題已創建。

轉載註明原文: 如何一次更新所有Bitbucket存儲庫問題?

猜你喜歡