Issues

Issue 评论图片上传链接。Create comment image upload URL.

为指定 Issue 的评论生成一个图片附件上传 URL。 Generate an image asset upload URL for a comment on the specified issue. 获取到 upload_url 后,请使用 HTTP PUT 方法以流式方式将图片内容上传至该地址。 After obtaining upload_url, use HTTP PUT to upload image content as a stream to that address. 上传完成后,将返回的 asset_link 插入到创建或编辑评论请求的 body 中,即可在评论中展示该图片。 After uploading, insert the returned asset_link into the body of the create or edit comment request to display the image in the comment. 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-notes:rw

post/{repo}/-/issues/{number}/comment-image-asset-upload-url

Request

  • Base URL: https://api.cnb.cool (the document declares no server; this is the origin it was published from)
  • URL: https://api.cnb.cool/{repo}/-/issues/{number}/comment-image-asset-upload-url
  • Auth: API key in header Authorization

Path parameters

repostring required

不带.git后缀的仓库名称。格式:组织名称/仓库名称。Repository name without .git suffix. Format: org/repo.

numberinteger required

Issue唯一标识编号。

Request body

content_typestring

文件类型。File type.

namestring

文件名。必填。File name (required).

sizeinteger

文件大小,单位:字节。必须大于 0。File size in bytes. Must be greater than 0.

Response

Created

Changes

No recorded changes to this operation across all 1 revision of this API.