Is it possible to completely remove an issue from the GitHub issue tracker?
11 Answers
No, the github API only allows you to open/close/reopen issues. Here's the Issues API docs.
-
1Does 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.– jwwCommented Jun 20, 2016 at 4:42
-
30Nearly 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.– SliqCommented Apr 15, 2017 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. Commented Jul 28, 2018 at 16:11
-
1This 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 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) Commented Aug 23, 2018 at 12:01
-
@StingyJack that's not the same as deleting an issue (though effectively it does come close) Commented Aug 24, 2018 at 13:50
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.
-
4Note that it's not possible to edit the title of an issue posted by another user.– ocodoCommented Dec 1, 2012 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.– SourabhCommented Apr 23, 2014 at 13:39
-
5This doesn't really work anymore due to the audit log GitHub recently introduced github.com/blog/1866-the-new-github-issues Commented Oct 9, 2014 at 16:58
Update Nov 2018: You now can delete issues if you are a owner of the repository!
See "Github - remove issues entered in error"
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:
- issues opened over a year ago
state:open created:<2013-01-01
- the ones I'm involved with
involves:twp state:open created:<2013-01-01
- and those not updated in the last year
involves:twp state:open updated:<2013-01-01
-
-
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"?)– VonCCommented Nov 21, 2020 at 19:23
-
1@CiroSantilliTRUMPBANISBAD Good point, thank you for the edit!– VonCCommented Feb 8, 2021 at 16:21
-
1I 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?. Commented May 28, 2021 at 19:27
-
1@questionto42 Thank you. I have included your comment in the answer for more visibility.– VonCCommented May 28, 2021 at 19:33
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:
- Clone your original repo.
- Copy your issues via the Issues API.
- Delete the original repo; alternatively, chose a new name for your new repo.
- Re-create a new repo based on your clone.
- 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.
-
6Deleting 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. Commented May 16, 2013 at 5:58
-
39LOL! Even thought your answer is technically right, its a PITA to do this and insane totally! Commented Jul 1, 2013 at 21:20
-
12This 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.– VolteCommented Aug 3, 2014 at 6:14
-
3I 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. Commented Aug 4, 2014 at 12:23
-
1What is a "target of association" (in your first paragraph)? (English is not my native language) Commented Aug 15, 2015 at 7:34
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.
You can delete the entire repo if it's really important.
-
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 LuggCommented May 4, 2017 at 0:35
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.
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
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.
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.
-
1
- You can create a new repository.
- Transfer (yeah it is possible) unwanted issues to the new repository.
- Then delete the new repository.
-
1Please add some good reason to do all this stuff - have you read the accepted answer? Commented Sep 25, 2020 at 6:05
"changed the title to"
comments.