.nh .TH "GH-ISSUE-ARTIFACT-EDIT" "1" "Oct 2026" "" "GitHub CLI manual" .SH NAME gh-issue-artifact-edit - Edit an issue artifact (preview) .SH SYNOPSIS \fBgh issue artifact edit { | } [flags]\fR .SH DESCRIPTION Rename an issue artifact or replace its content. The type never changes, so a link's new content must be an http(s) URL or a \fB\&.url\fR Internet Shortcut file. .PP Name the artifact by its issue and number, or by its URL. \fB\fR is an issue number or URL. .PP With only \fB--attach\fR, the attachments are appended to the current content. .PP With \fB--restore-version\fR, an earlier version's name and content are saved as a new version. \fBgh issue artifact view\fR shows the edit history. .SH OPTIONS .TP \fB--attach\fR \fB\fR Attach an image or video file, in '#\&' format .TP \fB-b\fR, \fB--body\fR \fB\fR New content; for a link, a URL .TP \fB-F\fR, \fB--body-file\fR \fB\fR Read new content from file (use "-" to read from standard input) .TP \fB--name\fR \fB\fR New name .TP \fB--restore-version\fR \fB (default 0)\fR Restore the version with this number from the edit history .SH OPTIONS INHERITED FROM PARENT COMMANDS .TP \fB-R\fR, \fB--repo\fR \fB<[HOST/]OWNER/REPO>\fR Select another repository using the [HOST/]OWNER/REPO format .SH EXIT CODES 0: Successful execution .PP 1: Error .PP 2: Command canceled .PP 4: Authentication required .PP NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information. .SH EXAMPLE .EX # Rename an artifact $ gh issue artifact edit 142 2 --name 'OAuth callback plan v2' # Replace a document's content with a file $ gh issue artifact edit 142 2 --body-file 2-OAuth-callback-plan.md # Point a link at a new URL $ gh issue artifact edit 142 3 --body https://github.com/monalisa/monas-cafe/wiki/OAuth-runbook-v2 # Append an image to a document $ gh issue artifact edit 142 2 --attach ./signin-flow.png # Restore an earlier version $ gh issue artifact edit 142 2 --restore-version 5 .EE .SH SEE ALSO \fBgh-issue-artifact(1)\fR