How to completely remove an issue from GitHub?

2019-01-12 16:30发布

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

9条回答
唯我独甜
2楼-- · 2019-01-12 17:17

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.

查看更多
爷、活的狠高调
3楼-- · 2019-01-12 17:17

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.

查看更多
Anthone
4楼-- · 2019-01-12 17:19

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.

查看更多
登录 后发表回答