Open mknicos opened 10 years ago
Source repo validation should also include a check to make sure the repo itself has the proper file structure (like elizabrock/software-development-curriculum).
current_user.octoclient.tree(course.source_repository, "master", recursive: false)
When an instructor creates a course one of the fields the form asks for is Source Repository. This needs to be validated to ensure the instructor is only putting in the github repo url starting with their username, or more simply put, the input should just be username/repository_name. If not the materials page will break. For example:
This form is looking for: elizabrock/coursewareofthefuture not https://github.com/elizabrock/coursewareofthefuture or github.com/elizabrock/coursewareofthefuture
Need to add clearer instructions, or smarter code.