How to remove sensitive information from issue history on GitHub
Asked Answered
D

1

8

I am using a public GitHub repository to collaborate on a project. Because I am an idiot, I created an issue with some sensitive information that I can't share.

Because I need the overall issue information, and the sensitive information could be withdrawn with no meaningful effects, is there a way to remove it from the issue without the necessity to delete it?

Most of the answers I've found talk about removing information from files and their commits, like this one and this one.

Dobbins answered 28/10, 2021 at 13:39 Comment(0)
T
11
  1. Click on edited in the top bar of the edited issue
  2. Click on the revision you want to remove in the popup menu
  3. Click on Options
  4. Click on Delete revision from history

Note

The most recent revision cannot be deleted.
Need to delete sensitive information? Go to the specific edit where the information was added.

To delete the most recent revision, make another new revision. Then the previously most recent revision can be deleted.

screenshot issue comment with popup menu



screenshot revision options

There will still be an entry in the list of all revisions, but it's not clickable anymore and the content is not available.

See also the GitHub documentation:
https://docs.github.com/en/communities/moderating-comments-and-conversations/tracking-changes-in-a-comment#deleting-sensitive-information-from-a-comments-history

Titration answered 24/5, 2022 at 21:13 Comment(4)
Doesn't work. It is still visible.Ararat
It seems to work (duly appreciated), because the sensitive data becomes inaccessible via the web interface, but the revision history still contains the timestamp of your removed edit (marked as deleted), so it is possible that the contents with the sensitive data are still left in the database, not just their timestamp.Garay
I think Github treats Issue history just like comment history, <docs.github.com/en/communities/…>Allies
How do you remove sensitive information in the title? Apparently there's no way to remove the title editing history if you don't own the repo.Orna

© 2022 - 2024 — McMap. All rights reserved.