-->

How to completely remove an issue from GitHub?

2019-01-12 16:32发布

问题:

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

回答1:

Update Nov 2018: You now can delete your issues!
See "Github - remove issues entered in error"


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


回答2:

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



回答3:

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.



回答4:

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.



回答5:

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.



回答6:

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



回答7:

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