如何从 GitHub 上彻底删除问题?

发布于 2024-09-06 13:05:43 字数 33 浏览 6 评论 0原文

是否可以从 GitHub 问题跟踪器中完全删除问题?

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(11

浅忆流年 2024-09-13 13:05:43

不可以,github API 只允许您打开/关闭/重新打开问题。 这里是问题 API 文档

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

悲喜皆因你 2024-09-13 13:05:43

您可以编辑现有问题(假设它是重复的),并且可以将标题、描述和目标里程碑更改为完全不同的内容。这已经是你能最接近取消罚单了,AFIK。

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.

_畞蕅 2024-09-13 13:05:43

2018 年 11 月更新:如果您是存储库的所有者,现在可以删除问题
请参阅“Github - 删除错误输入的问题

问题删除

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

在存储库中拥有管理员权限的人员可以从存储库中永久删除问题。

对于其他人(未经许可),questionto42评论显示您可以向 GitHub 支持请求删除该问题,如 此处说明


2018 年 5 月,原始答案:

三年8 年后,关闭问题仍然是答案(仍然无法删除)。
请参阅“The Ghost of Issues Past”,其中 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:

只为一人 2024-09-13 13:05:43

对于后代:删除问题将是一件坏事,因为通常它们可以成为 github 上关联的目标。

但如果您愿意牺牲协作信息,这里有一个“用大锤敲打它”的方法:

  1. 克隆您的原始存储库。
  2. 通过问题 API 复制您的问题。
  3. 删除原来的repo;或者,为您的新存储库选择一个新名称。
  4. 根据您的克隆重新创建一个新的存储库。
  5. 通过问题 API 重新创建您想要保留的问题。

我想这可能会丢失很多其他链接信息,例如分叉、拉取请求等。

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.

高速公鹿 2024-09-13 13:05:43

公共功能请求

我在 2014 年 8 月写信给 GitHubhttps://github.com/jdennes 通过电子邮件回复:

谢谢你的建议。目前只能编辑/清除问题内容。不过,我已在我们的内部功能请求列表中对此建议添加了 +1。

确认这是不可能的。

迄今为止最好的解决方法

  • 将标题设置为永远不会与任何搜索冲突的内容,例如单个点.

    这可能不会完全隐藏您的错误历史,因为自动不可删除的“将标题更改为”注释。

  • 清空正文

GitHub 工作人员有权力

如果出现安全问题,请联系 GitHub 工作人员,他们通常回复很快,并且能够为您解决问题可以在以下位置看到:http://archive.is/OfjVt,其中有问题 1 和问题 3,但没有2.

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.

谷夏 2024-09-13 13:05:43

如果它真的很重要,您可以删除整个存储库。

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

清引 2024-09-13 13:05:43

可能的解决方法

截至04/2019,并非所有问题都可以删除当前的解决方法是编辑问题然后删除编辑历史记录,唯一的缺点是问题仍然存在并且可以看到旧标题。

Screenshot_20190419_072804

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

墟烟 2024-09-13 13:05:43

您可以通过请求 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

撩起发的微风 2024-09-13 13:05:43

用户无法执行此操作,包括存储库所有者。

但问题可以通过 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.

欢你一世 2024-09-13 13:05:43

还是不可能。其他答案中建议的解决方法是将问题标记为“已删除”(或您可能更喜欢的任何其他标签),以便在使用 github API 检索它们时能够将其过滤掉。显然,您应该仅将特定标签用于此目的,并在关闭问题时设置标签。

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.

送舟行 2024-09-13 13:05:43
  1. 您可以创建一个新的存储库。
  2. 将(是的,这是可能的)不需要的问题转移到新存储库。
  3. 然后删除新的存储库。
  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.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文