How do I move an issue on github to another repo?

Github

Github Problem Overview


It happens every now and then. Some library depends on another and a user opens an issue that belongs to the wrong repo. Can I move the issue to the other repo?

You could argue that the issue could be seen as being both repos' issue because one depends on the other and as long as one doesn't work properly both don't. But I'd rather talk about solutions to the issue in the repo it belongs in.

Github Solutions


Solution 1 - Github

No, officialy you can't move issues between repositories.

There is a hack though, github-issues-import, kind of a plugin, to import issues from a repository to another.

Solution 2 - Github

See the GitHub docs on transferring issues.

> # Transferring an open issue to another repository > On GitHub, navigate to the main page of the repository. > > Under your repository name, click Issues. > > In the list of issues, click the issue you'd like to transfer. > > In the right sidebar, click Transfer this issue.

Solution 3 - Github

I've created a Chrome Extension called Kamino that will clone issues from one repository to another. It will also close the original issue. It will also eventually be available for MS Edge.

https://chrome.google.com/webstore/detail/kamino/ffdebockfdjileaojbbccofhgncmioaf?hl=en-US

Solution 4 - Github

Move Issue If you have the ZenHub integration you will see this button at the very lower-right when viewing an issue. This allows the issue to be copied to another repo in the same organization, or copied and closed.

And yes, "Move Issue" is a misnomer.

There seems to still be no way to move (copy and delete) or to just delete, a mistakenly-submitted issue.

EDIT: Beware, the v1 of this feature has major limitations like leaving behind some(most?) of the issue's metadata, not notifying subscribers, etc.

Solution 5 - Github

This is now (May 2019) easier.

See "Improvements to issue transfer permissions "

> Users with write access to two repositories can now use issue transfer to move issues between them.
Previously, only users with admin permissions on both repositories had the ability to transfer issues.

> In addition, we will no longer allow issues to be transferred from private to public repositories.

See more at "Transferring an issue to another repository".

Solution 6 - Github

The visual answer as taken from github docs:

Transferring an open issue to another repository

  1. On GitHub, navigate to the main page of the repository.
  2. Under your repository name, click Issues. Issues tab
  3. In the list of issues, click the issue you'd like to transfer.
  4. In the right sidebar, click Transfer issue. Button to transfer issue
  5. Use the Choose a repository drop-down menu, and select the repository you want to transfer the issue to.

Choose a repository selection

  1. Click Transfer issue.

Transfer issue button

Solution 7 - Github

Addition to the answer from @MatthewMcCullough.

If you have many issues to transfer doing every one from a browser can be tedious.

You can then use GitHub CLI like this:

gh issue transfer issue owner/repo

> Use the gh issue transfer subcommand. Replace the issue parameter with > the number or URL of the issue. Replace the owner/repo parameter with > the name of the repository that you want to transfer the issue to, > such as octocat/octo-repo.

Note that:

> The issue's labels and milestones are not retained. This issue will > stay on any user-owned or organization-wide project boards and be > removed from any repository project boards.

https://docs.github.com/en/issues/tracking-your-work-with-issues/transferring-an-issue-to-another-repository

https://docs.github.com/en/github-cli/github-cli/about-github-cli

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
QuestionfentView Question on Stackoverflow
Solution 1 - GithubDaniel RibeiroView Answer on Stackoverflow
Solution 2 - GithubMatthew McCulloughView Answer on Stackoverflow
Solution 3 - GithubJohn MurphyView Answer on Stackoverflow
Solution 4 - GithubSpike0xffView Answer on Stackoverflow
Solution 5 - GithubVonCView Answer on Stackoverflow
Solution 6 - GithubRiyafa Abdul HameedView Answer on Stackoverflow
Solution 7 - GithubOgglasView Answer on Stackoverflow