420

Is it possible to completely remove an issue from the GitHub issue tracker?

kenorb
  • 155,785
  • 88
  • 678
  • 743
YGL
  • 5,540
  • 2
  • 22
  • 19
  • 37
    An interesting side-question: How is this answer legally consistent? I don't know about the U.S. but in Europe one has author-rights (they go beyond copyright) that says one has control about how/if something is published. This means one can decide to withdraw a publication. This right can't even be transmitted to a third party (it's a moral right). – Willem Van Onsem Aug 12 '14 at 21:04
  • 2
    @CommuSoft Nice consideration. Maybe suing them through the Right to be forgotten is the best option for Europeans today. – Ciro Santilli OurBigBook.com Aug 15 '14 at 09:10
  • This is a superset of what you asked for, but since it's related -- Deleting your account removes all issues, pull requests etc. : https://help.github.com/articles/deleting-your-user-account – user Sep 15 '14 at 14:25
  • 1
    @CommuSoft Technically, you're able to edit the title / msg so I belive it would be easily defendable for GH. : ) – Marek Lewandowski Apr 28 '15 at 20:23
  • 1
    @MarekLewandowski: that's indeed a possibility given Github doesn't keep track of the changes (or you can at least remove history). I know Google faces the same problem with cached versions of webpages. In rare occasions you can for instance ask Google to remove certain pages/history for instance if your name has been cleared in court, you can ask to remove links to articles stating you were suspected of some crime. – Willem Van Onsem Apr 28 '15 at 21:12
  • 3
    @MarekLewandowski true for issue body, but not title, which shows undeletable `"changed the title to"` comments. – Ciro Santilli OurBigBook.com May 31 '15 at 20:40
  • 1
    See: [Delete / remove an issue completely](https://github.com/isaacs/github/issues/253) at GitHub – kenorb Aug 17 '15 at 22:50
  • @Apparently the best we can do is remove the original text, and **Close** the issue. – ccpizza Oct 01 '16 at 10:09
  • Update Nov. 2018: You now **can delete your issues**! See https://stackoverflow.com/a/53195537/6309. And I have updated [my answer below](https://stackoverflow.com/a/20652886/6309). – VonC Nov 07 '18 at 18:25

11 Answers11

220

No, the github API only allows you to open/close/reopen issues. Here's the Issues API docs.

Mauricio Scheffer
  • 98,863
  • 23
  • 192
  • 275
  • 1
    Does this apply to collaborators as well? If so, how do we delete the questions users sometimes ask through the bug tracker instead of out mailing list or Stack Overflow? I find it hard to believe we have to file a Bug Report with GitHub and ask them to delete it. – jww Jun 20 '16 at 04:42
  • 29
    Nearly 7 years and thousands of requests later: GitHub still isn't able to delete issues :/ Looks like it will take some time until we have flying cars and skyscrapers on Mars. – Sliq Apr 15 '17 at 13:17
  • Note that issues can be deleted by Github support. One may contact them and request deletion. It may be delayed or refused but it is an available option that can be used. – reducing activity Jul 28 '18 at 16:11
  • 1
    This answer is no longer true. I had another user (not GH) alter the title of my issue, change the text of the issue, and then [delete the edit history](https://imgur.com/xBKd45D) so noone could see the originally reported issue (Which was only critical of some of the content that was both poor quality and unfactual in several ways. It was not obscene, profane, or even really rude) – StingyJack Aug 23 '18 at 12:01
  • @StingyJack that's not the same as deleting an issue (though effectively it does come close) – Mauricio Scheffer Aug 24 '18 at 13:50
  • The only difference is that the issue is not deleted. – Anders Lindén Oct 22 '18 at 13:39
  • Deleting issues is now possible as of Nov 2018. – James Aug 06 '19 at 18:20
62

You can edit an existing issue (let's say if it's a duplicate) and you can change the title, description and target milestone to be something completely different. That's as close as you can get to removing the ticket, AFIK.

Kiril
  • 39,672
  • 31
  • 167
  • 226
  • 4
    Note that it's not possible to edit the title of an issue posted by another user. – ocodo Dec 01 '12 at 23:41
  • @EmacsFodder It is now, title as well as the comment of OP. I am not sure when they added this. Maybe only owner of repo can do this? Probably. – Sourabh Apr 23 '14 at 13:39
  • 5
    This doesn't really work anymore due to the audit log GitHub recently introduced https://github.com/blog/1866-the-new-github-issues – Daniel Imms Oct 09 '14 at 16:58
45

Update Nov 2018: You now can delete issues if you are a owner of the repository!
See "Github - remove issues entered in error"

Issue deletion

https://docs.github.com/en/github/managing-your-work-on-github/deleting-an-issue mentions:

People with admin permissions in a repository can permanently delete an issue from a repository.

For other people (without permission), questionto42's comment shows that you can ask to GitHub support for the issue to be deleted, as illustrated here.


At May 2018, original answer:

Three 8 years later, and closing issues remains the answer (still no deletion possible).
See "The Ghost of Issues Past", where GitHub advise to check and close:

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Ten and counting. – j4k3 Nov 21 '20 at 19:21
  • 1
    @j4k3 But does the Nov. 2018 post I reference at the start of this updated answer address the question? (meaning: ten years, yes, but is it still "counting"?) – VonC Nov 21 '20 at 19:23
  • Oh dear. I somehow managed to ignore all of that, including the screenshot, when reading your answer. Thanks for pointing it out. – j4k3 Nov 21 '20 at 19:33
  • @j4k3 You do have a point though, as not every deletion case is possible, if I understand [intika](https://stackoverflow.com/users/4877948/intika)'s [answer](https://stackoverflow.com/a/55767472/6309) correctly. – VonC Nov 21 '20 at 19:36
  • Seems so. Only the owner/admin of the repo can delete, not the reporing user. – j4k3 Nov 21 '20 at 19:38
  • Hi Von, I clarified my understanding that you need to be an owner of the repo to delete it. – Ciro Santilli OurBigBook.com Feb 08 '21 at 16:09
  • 1
    @CiroSantilliTRUMPBANISBAD Good point, thank you for the edit! – VonC Feb 08 '21 at 16:21
  • 1
    I can confirm this, as a user without admin rights, I could ask the open source team to ask a GitHub admin to delete my issue, and it was done, see [How to delete an issue or contents of it on GitHub, given that a normal member of the project does not have the rights?](https://webapps.stackexchange.com/questions/145739/how-to-delete-an-issue-or-contents-of-it-on-github-given-that-a-normal-member-o/145740#comment133224_145740). – questionto42 May 28 '21 at 19:27
  • 1
    @questionto42 Thank you. I have included your comment in the answer for more visibility. – VonC May 28 '21 at 19:33
31

For posterity: Deleting issues would be a bad thing, since in general they can be targets of associations on github.

But if you are willing to sacrifice the collaboration info, here is a "whack it with a sledgehammer" approach:

  1. Clone your original repo.
  2. Copy your issues via the Issues API.
  3. Delete the original repo; alternatively, chose a new name for your new repo.
  4. Re-create a new repo based on your clone.
  5. Re-create the issues you want to keep via the Issues API.

I imagine this could potentially lose a lot of other linking information as well such as forks, pull requests, etc.

jerseyboy
  • 1,298
  • 13
  • 13
  • 6
    Deleting issues makes sense if there is something unusual happening. For example, I'm moving my code and issues to GitHub and someone has reported a 'new' issue on GitHub before I've finished the move. I need to keep the issue numbers unchanged, so I'll now have to completely hijack this 'wrong' issue. – Joseph Wright May 16 '13 at 05:58
  • 39
    LOL! Even thought your answer is technically right, its a PITA to do this and insane totally! – Sandeep Raju Prabhakar Jul 01 '13 at 21:20
  • 12
    This answer is *not* technically correct. It's opinionated. We're not discussing the opinions of deleting an issue. We're discussing a lack of a basic CRUD (**D**) operation that should be present in most things. It's demeaning and disrespectful for software solutions to restrict basic features in an attempt to "Protect us from ourselves". This is not the U.S. Federal Government; we don't need to be babysat. – Volte Aug 03 '14 at 06:14
  • 3
    I agree in theory with inconsistencies in interfaces. Telling the OP not to do it was not my main point. It was merely a cautionary statement before I suggested a potentially destructive brute force path to achieving the OP's goal. Besides, StackOverflow isn't the proper venue for criticisms of Github's API. Those should be addressed to Github. – jerseyboy Aug 04 '14 at 12:23
  • 1
    What is a "target of association" (in your first paragraph)? (English is not my native language) – KajMagnus Aug 15 '15 at 07:34
  • 1
    @KajMagnus if you type in the issue number in a comment, a link is automatically created. You can even link to issues in another repo this way. OP is saying that these associations would be lost if you deleted the issue. – mraaroncruz Nov 20 '15 at 23:35
  • Actually contacting GitHub for a deleting request is easier. If you really want to do it THIS way - This will have reasons. So maybe this reasons are important enough, so GitHub Staff will actually delete issues. It's not common, but maybe they will do it. – CodeBrauer Nov 10 '17 at 15:37
29

Public feature request

I wrote to GitHub in 2014-08 and https://github.com/jdennes replied by email:

Thanks for the suggestion. It's only possible to edit/clear the issue content currently. However I've added a +1 to this suggestion on our internal Feature Request List.

confirming it was not possible.

Best workaround so far

  • set the title to something that will never conflict with any search, e.g. a single dot ..

    This may not hide the history of your blunder entirely because of the automatic undeletable "changed the title to" comments.

  • make the body empty

GitHub staff has the power

If something is a security issue, contact GitHub staff, they usually reply quickly, and are able to remove issues for good as can be seen at: http://archive.is/OfjVt which has issue 1 and 3 but no 2.

Ciro Santilli OurBigBook.com
  • 347,512
  • 102
  • 1,199
  • 985
9

You can delete the entire repo if it's really important.

Dorian
  • 22,759
  • 8
  • 120
  • 116
  • 3
    +1'd to fix the -1. This might be absurd, but it's the only way to actually remove the content. Baby, bath water, and kitchen sink. – Dan Lugg May 04 '17 at 00:35
4

Possible workaround

As of 04/2019 not all issues can be deleted current work around is to edit the issue then delete the edit history, the only downside is that the issue still exist and the old title could be seen.

Screenshot_20190419_072804

Community
  • 1
  • 1
intika
  • 8,448
  • 5
  • 36
  • 55
0

You could by just asking to github to ban the user that created the issue

Source: https://github.com/isaacs/github/issues/253#issuecomment-290944938

Philippe
  • 28,207
  • 6
  • 54
  • 78
0

Users are unable to do this, including repository owner.

But issues can be deleted by Github support. One may contact them and request deletion. It may be delayed or refused but it is an available option that can be used.

reducing activity
  • 1,985
  • 2
  • 36
  • 64
0

Still impossible. Another workaround to the ones suggested in the other answers is to label the issue as "deleted" (or any other label you might fancy better), to be able to filter them out if you use the github API to retrieve them. Obviously you should use that specific label only for this purpose, setting the label when you close the issue.

Mark Kaplun
  • 276
  • 2
  • 13
-1
  1. You can create a new repository.
  2. Transfer (yeah it is possible) unwanted issues to the new repository.
  3. Then delete the new repository.
Detroit
  • 17
  • 1
  • 4