Repository navigation
Support Markdown (.md) file attachments with --attach #14407
Agent suggestions
Public previewDescription
Activity
This looks like a clear, well-scoped enhancement request — no duplicates found (searched
cli/clifor related "attach"/"markdown"/"document" issues; #14194 is a broader related tracking issue mentioned by the reporter, not a duplicate). I'm suggestingenhancementandgh-issue(the request also spansgh pr, but issue commands are the primary example given).Looking at the implementation,
--attachcurrently only accepts a fixed extension allowlist insupportedContentType, backed by thecontentTypestable at userasset.go#L24-L37, which lists only image and video extensions (.png,.jpg,.jpeg,.gif,.webp,.svg,.mp4,.mov,.webm)..mdisn't in that table, so a.mdpath passed to--attachfails validation today. Supporting it would need a new "document" asset kind (distinct fromimageAsset/videoAsset) that renders a plain download link (e.g.[filename.md](url)) rather than an image embed or bare player URL, plus wiring throughnewAssetand the upload/rewrite logic inattach.go. This is a reasonable, contained addition to the existing attachment path rather than the broader upload/download feature requested in #14194.Generated by Issue Triage (skills-driven) for #14407 · copilot · auto · 42.5 AIC · ⌖ 2.48 AIC · ⊞ 10K · ◷
- addedenhancementa request to improve CLIa request to improve CLIplatformProblems with the GitHub platform rather than the CLI clientProblems with the GitHub platform rather than the CLI clientattachmentsIssues regarding `--attach`Issues regarding `--attach`
on Sep 9, 2026 Thank you for your issue! We have categorized it as an enhancement (feature or improvement) request, and it has been added to our backlog. In doing so, we are not committing to implementing this feature at this time, but, we will consider it for future releases based on community feedback and our own product roadmap.
Unless you see the help wanted
Contributions welcome label, we are not currently looking for external contributions for this feature.If you come across this issue and would like to see it implemented, please add a thumbs up! This will help us prioritize the feature. Please only comment if you have additional information or viewpoints to contribute.
This seems like a pretty artificial limitation, and I look forward to see this implemented.
In fact I suggest adding not only Markdown, but all file types listed in https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/attaching-files#additional-file-types so that the CLI matches what can already be done in the web UI.
Describe the feature or problem you’d like to solve
Please add support for attaching Markdown (
.md) files through the existing--attachflag on issue, pull request, and comment commands.The current flag supports images and videos. It would also be useful to upload a Markdown document as a downloadable file attachment, for example an implementation plan, investigation report, or review notes, without copying the entire document into the issue or comment body.
Using
--body-file report.mdserves a different purpose: it reads the document into the body rather than attaching the original file.Proposed solution
Allow
.mdfiles wherever--attachis supported:Expected behavior:
.mdfile as a GitHub attachment and preserve its filename and contents.[report.md](<uploaded-url>), instead of an image embed or the document contents.--attachflags, including Markdown files alongside supported images or videos.Additional context
Related to #14194, which requests general file attachment upload/download support. This request specifically covers uploading
.mdfiles through the existing--attachinterface; it does not request download commands or support for other document formats.Markdown is a common format for reports and plans produced by developers and coding agents. Attaching these documents would keep issue and PR discussions concise while preserving the complete document as a separate file.