shunk031-github-comment-attach-files
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese[!NOTE] After reading this, say:SKILL.md📎 I read shunk031-github-comment-attach-files.
[!NOTE] 阅读此后,请说:SKILL.md📎 I read shunk031-github-comment-attach-files.
GitHub Attach Files
GitHub 附加文件
Use this skill to attach supported media (images and videos) to GitHub pull request descriptions or issue and pull request comments on GitHub.com and GHE.com. This route does not support document uploads or GitHub Enterprise Server.
Check the installed CLI with and ; the installed CLI is the authority for media attachment support and flags.
gh pr edit --helpgh issue comment --help使用此 skill 可将支持的媒体(图片和视频)附加到 GitHub.com 和 GHE.com 上的 GitHub pull request 描述,或 issue 和 pull request 评论中。此方式不支持文档上传,也不支持 GitHub Enterprise Server。
使用 和 检查已安装的 CLI;是否支持媒体附件以及有哪些可用参数,应以已安装的 CLI 为准。
gh pr edit --helpgh issue comment --helpPull request descriptions
Pull request 描述
Use to upload supported media and write its Markdown into a pull request description:
gh pr edit <pr> --attach file#altbash
gh pr edit 123 \
--attach "results/before.png#With mathclap" \
--attach "results/after.png#Without mathclap"If the body does not reference an attached media file, appends the attachment Markdown to the description. Include explicit image or video references in the body when their position or surrounding explanation matters.
gh pr edit使用 上传支持的媒体,并将其 Markdown 写入 pull request 描述:
gh pr edit <pr> --attach file#altbash
gh pr edit 123 \
--attach "results/before.png#With mathclap" \
--attach "results/after.png#Without mathclap"如果正文未引用已附加的媒体文件, 会将附件 Markdown 追加到描述末尾。当媒体的位置或上下文说明很重要时,请在正文中显式引用图片或视频。
gh pr editIssue and pull request comments
Issue 和 pull request 评论
Use when supported media belongs in a submitted issue or pull request comment:
gh issue comment <number-or-url> --attach file#altbash
gh issue comment 123 \
--body 'Rendered comparison:' \
--attach "results/before.png#Before" \
--attach "results/after.png#After"The CLI workflows mutate GitHub immediately; confirm the target and requested write before running them.
当需要在提交的 issue 或 pull request 评论中添加支持的媒体时,使用 :
gh issue comment <number-or-url> --attach file#altbash
gh issue comment 123 \
--body 'Rendered comparison:' \
--attach "results/before.png#Before" \
--attach "results/after.png#After"这些 CLI 工作流会立即修改 GitHub 上的内容;运行前请确认目标对象和要执行的写入操作。
Prerequisites
前置条件
- must be installed and authenticated.
gh - If the CLI does not expose , report that the installed version does not support direct attachments.
--attach
- 必须已安装并认证 。
gh - 如果 CLI 未提供 ,请说明已安装的版本不支持直接附加附件。
--attach