17

I am curious if you can move a github 'Project' from one repository to another.

Should be more specific. Github has a 'Project' feature that allows you to create a simple kanban board. enter image description here

I would like to move this project from repo-a to repo-b. Looking through the UI I do not see a way to do this.

Buster
  • 685
  • 1
  • 5
  • 28
  • What are your expectations about the _issues_ in the repo-a? They don't belong to repo-b; do you want the Project on repo-b with kanbans for issues of repo-a? Or otherwise? – Kamafeather Jun 13 '23 at 23:10

2 Answers2

1

A single GitHub Project can span multiple repositories, so your best bet is to add the new repository and remove the old one.

Unfortunately, the Kanbans refer the specific GitHub issues inside a specific repository: so if you remove the source repo, you'll loose also the related issues from the Project.

In case you want to keep you old issues on the new repository, your best bet is to:

  • transfer the issues from repo-a to repo-b (Select issue -> Transfer Issue -> Choose Repository)
  • if you want, try the "Make a copy", option under the Project's ᐧ ᐧ ᐧ button
  • go to repo-b's issues, select them all, click the _"Projects" dropdown and choose your own Project.
    • you'll see a spinner icon; wait till it's done and you get a green confirmation.
    • now all the selected issues should be present inside you project.
      Although you can't get automatically the cards back to where they were in repo-a.
      You will need to redistribute them manually.
Kamafeather
  • 8,663
  • 14
  • 69
  • 99
  • The original question doesn't say anything about deleting a repo or migrating issues. It is asking about the UI – ajgrinds Jun 13 '23 at 20:48
  • I am talking about the UI and about what's currently possible: Projects are organization- or user-wise, not repo-wise, so Kanbans can reference different repos, as you also answered. – Still, to me looks like OP wants to move over also the created Kanban board _"Purple-Daily-Jobs"_; there's no UI option to move also the Kanban content with its issues (because issues belogn to repo-a). I suggested to just to switch one repo with another, in the Project; not to delete any repository. – Kamafeather Jun 13 '23 at 23:21
  • Actually I figured out a way! Updated my answer. – Kamafeather Jun 14 '23 at 01:27
1

Im not sure if this is how it was 3 years ago, but inside of the projects page there is now a button to "Link a Project":

enter image description here

As projects can span multiple repos, you can just link the project to however many repos you want to be contained inside of it.

ajgrinds
  • 186
  • 11