Replicating the entire GitHub repository with issues, wikis,

Is there a way to make a “fork” of a repository hosted on GitHub so that it includes all of the issues, pull requests, wikis, and all the other things that come with the repository (although, I am most interested in the issue reports and pull requests - both open and closed). This would be basically a snapshot of the project, not just the source code.

The idea is to be able to create reusable (as in semester after semester) activities for students that are based on real-world open source projects. This would be used in the early stages of introducing students to working with a large code base, reading through existing issue reports and pull requests and coming up with potential solutions to open issues (even though in the “real” version of the project that issue might have been already fixed and the code base might be significantly different).

I don’t believe so. While I get why you want it, you have to understand that issues are created to be accepted by the authors of the respective repositories, so replicating these issues into a cloned repo wouldn’t entirely make sense. I hope this helps

GitHub has an API for creating issues (https://developer.github.com/v3/issues/#create-an-issue), but this isn’t something that would happen automatically as part of GitHub Classroom.

The shiny new thing is GitHub Actions (https://github.com/features/actions). You could create an action that runs “on create” and then adds issues. An “action” is just a file in the .github directory, so at least theoretically, after the GitHub Classroom clone operation completes, the “create” actions should trigger. Actions is currently in beta; you have to request access to it from each organization.

Probot (https://github.blog/2019-04-10-save-setup-time-with-github-classroom-and-probot/) can also probably do what you want.

So… Probot vs. Actions? (https://jasonet.co/posts/probot-app-or-github-action/) For something like this, you don’t want the startup time of Actions, so Probot is probably the way to go.

Also, there’s the new GitHub Templates (https://github.blog/2019-06-06-generate-new-repositories-with-repository-templates/), which sure seems a whole lot like GitHub Classroom clone links, only not exactly. I don’t think it clones issues and such yet, but the text on this web site suggests that that sort of thing is “coming soon”.

3 Likes