elizabrock / coursewareofthefuture

The Courseware of the Future!! (For Nashville Software School)
MIT License
8 stars 6 forks source link

Course Create Repository URL Validation #38

Open mknicos opened 10 years ago

mknicos commented 10 years ago

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.

adamthede commented 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).

elizabrock commented 10 years ago

current_user.octoclient.tree(course.source_repository, "master", recursive: false)