Open favonia opened 5 years ago
FYI: the UI was turned off in PR #1163. While I understand GitHub Enterprise does not support template repositories (yet), general importing should work.
Thanks for opening this @favonia... my understanding is that the non-template version of this relied on Porter which I thought (possibly wrongly) was not part of GitHub Enterprise. If it is, I think we'll need to do some work there. The good news is template repositories have landed in GitHub Enterprise! (See https://github.blog/2019-08-20-github-enterprise-server-2-18-is-here/#repository-templates). Maybe that is a quicker path forward?
Thanks for the great news! But no, I do not think that path would be faster. It will take some time for my school to upgrade GitHub Enterprise, so a workaround will still be appreciated.
In the meanwhile, perhaps we should enable the entire UI now---maybe with a warning. ;-)
Hi favonia,
I've GitHub Enterprise 2.18 succesfully running with Classroom Assignments and Template Repositories feature.
To get the thing working you have to remove the '" include_all_branches" property in "app/services/create_github_repo_service.rb" from "def repo_from_template_options"
regards Mario
@favonia @jeffrafter When #1163 was opened 2 years ago (:grinning:), we would have had to have separate implementations of the same feature for GitHub.com vs GitHub Enterprise and after talking with the maintainers at the time, it definitely didn't justify the technical debt to pull it off. Starting with 2.18 (which everybody should upgrade to because it's awesome), we could totally do template repositories.
I'd be glad to open up that work (or anybody else can if interested). That's going to be a must-have feature for my faculty, at least.
@mdwheele Me and the engineering team would be happy to help and review that work!
To @mwehr 's point (It seems include_all_branches
didn't make it into 2.18), it may make sense to have the users enterprise version be a part of the .env so we can conditionally enable/disable features that don't exist in old versions of enterprise.
@d12 Is it possible to parse X-GitHub-Enterprise-Version:
directly from the HTTPS response?
@mdwheele My school has 2.18 now. Did you create a pull request already for your work? I could not find it.
TIL that's a header that exists! That's a great way to solve the issue.
I don't think we'll have bandwidth to take this on in the short-term, but as always, we're happy to review any and all contributions :)
Currently the UI to specify starter code is turned off when connected to GitHub Enterprise, but it seems there is no fundamental reason not to support it. I suspected that we can just replace
https://github.com
withGitHubClassroom.github_url
in the following:https://github.com/education/classroom/blob/0ab1d4be6727dac8dd6be7703ce385ad53ee11d9/app/models/github_repository/import_dependency.rb#L9-L20
However, that does not seems to work. The import just hangs. I wonder if there's something I missed? This will be a very useful feature for my class. Thanks.