You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support deleting edit-history revisions for issue and PR descriptions #14387
Describe the feature or problem you’d like to solve
GitHub’s web UI lets authors remove a previous revision’s content through edited → Options → Delete revision from history.
gh issue edit and gh pr edit update the current description, but there is no equivalent command to remove a superseded revision’s content. Completing that workflow requires switching to the browser.
This capability would also be useful for comments, particularly when an earlier version contains sensitive information.
Proposed solution
Support listing edit-history revisions and deleting a selected revision’s content using normal GitHub CLI authentication.
Deletion should require confirmation identifying the issue, PR, or comment and the selected revision. It should preserve the editor and timestamp metadata, matching the website’s behavior.
This would let users complete the workflow from the CLI without handling browser-session credentials.
The public GraphQL API exposes UserContentEdit, including id, diff, deletedAt, and deletedBy. However, a public API request using deleteUserContentEdit was rejected with:
DeleteUserContentEditInput isn't a defined input type
Field 'deleteUserContentEdit' doesn't exist on type 'Mutation'
A successful deletion through the website used a request containing:
This appears to be an internal website operation rather than a mutation available through gh api graphql. The requested CLI functionality should use a supported API rather than depend on the website’s private endpoint.
If a public API addition is required first, please identify or link the prerequisite tracking request.
Reacted by Paul Schreiber, Harris Bard Lapiroff and Defines
Thanks for the detailed write-up! I'm suggesting the enhancement label — this is a clear feature request (deleting a specific edit-history revision from an issue/PR description or comment, mirroring the web UI's "Delete revision from history" option) with good context, including your investigation into the GraphQL API showing deleteUserContentEdit isn't currently a public mutation. No duplicate issues were found in this repo. Since the underlying mutation doesn't appear to be publicly available yet, a maintainer will likely need to confirm whether a supporting GitHub API exists or would need to be requested first before this can be implemented in gh.
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 wantedContributions 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.
Activity
cli-triage commentedon Sep 8, 2026
Thanks for the detailed write-up! I'm suggesting the
enhancementlabel — this is a clear feature request (deleting a specific edit-history revision from an issue/PR description or comment, mirroring the web UI's "Delete revision from history" option) with good context, including your investigation into the GraphQL API showingdeleteUserContentEditisn't currently a public mutation. No duplicate issues were found in this repo. Since the underlying mutation doesn't appear to be publicly available yet, a maintainer will likely need to confirm whether a supporting GitHub API exists or would need to be requested first before this can be implemented ingh.github-actions commentedon Sep 10, 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 wantedContributions 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.