How to completely remove an issue from GitHub?

GithubPrivacyIssue Tracking

Github Problem Overview


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

Github Solutions


Solution 1 - Github

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

Solution 2 - Github

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.

Solution 3 - Github

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:

Solution 4 - Github

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.

Solution 5 - Github

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.

Solution 6 - Github

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

Solution 7 - Github

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

Solution 8 - Github

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

Solution 9 - Github

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.

Solution 10 - Github

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.

Solution 11 - Github

  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.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionYGLView Question on Stackoverflow
Solution 1 - GithubMauricio SchefferView Answer on Stackoverflow
Solution 2 - GithubKirilView Answer on Stackoverflow
Solution 3 - GithubVonCView Answer on Stackoverflow
Solution 4 - GithubjerseyboyView Answer on Stackoverflow
Solution 5 - GithubCiro Santilli Путлер Капут 六四事View Answer on Stackoverflow
Solution 6 - GithubDorianView Answer on Stackoverflow
Solution 7 - GithubintikaView Answer on Stackoverflow
Solution 8 - GithubPhilippeView Answer on Stackoverflow
Solution 9 - Githubreducing activityView Answer on Stackoverflow
Solution 10 - GithubMark KaplunView Answer on Stackoverflow
Solution 11 - GithubDetroitView Answer on Stackoverflow