app/models/assignment_repo/creator.rb
# Public: Create the GitHub repository for the AssignmentRepo.
#
# Returns an Integer ID or raises a Result::Error
Create the GitHub repository for the AssignmentRepo.
Returns an Integer ID or raises a Result::Error
Create the GitHub repository for the AssignmentRepo . Returns an Integer ID or raises a Result :: Error
def create_github_repository!
      repository_name = generate_github_repository_name
      options = {
        private: assignment.private?,
        description: "#{repository_name} created by GitHub Classroom"
      }
      organization.github_organization.create_repository(repository_name, options)
    rescue GitHub::Error
      raise Result::Error, REPOSITORY_CREATION_FAILED
    end
def create_github_repository! repository_name = generate_github_repository_name options = { private : assignment . private? , description : "#{repository_name} created by GitHub Classroom" } organization . github_organization . create_repository ( repository_name , options ) rescue GitHub :: Error raise Result :: Error , REPOSITORY_CREATION_FAILED end
Public: Create the GitHub repository for the AssignmentRepo.
Public : Create the GitHub repository for the AssignmentRepo .