Bitbucket、Api 2.0、PR 附件

问题描述 投票:0回答:1

我想将附件上传到 bitbucket api 2.0 上的 PR。

在评论的情况下它很容易工作:

curl \
--user usename:pass  \
--request POST   \
--url https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments   \
--header 'Accept: application/json'   \
--header 'Content-Type: application/json'   \
--data '{"content": { "raw": "test" }}'

但不幸的是,当我想将附件上传到 PR 或分支时,我不知道它如何工作。

类似的解决方案:https://confluence.atlassian.com/bitbucketserverkb/how-to-enclose-file-to-pull-request-comment-via-rest-api-952073003.html

谢谢您的帮助,

api curl bitbucket
1个回答
0
投票

引用 https://bitbucket.org/blog/pr-attachments 于 2020 年 9 月 24 日发布:

从构建工具发布附件

用于拉取请求附件的公共 API 即将推出。现在, Atlassian 的内部团队正在使用此功能来发布视觉效果 与他们的构建工具不同。对于文本中的日志也可以完成同样的操作 文件。可能性是无限的。

截至 2023 年 9 月尚未添加该功能。

© www.soinside.com 2019 - 2024. All rights reserved.