from github import Github from github import GithubException class RepoListing(object): def __init__(self, name, url, quarter, moderator, listOfGithubIds, description): self.name = name self.url = url self.quarter = quarter self.moderator = moderator self.listOfGithubIds = listOfGithubIds self.description = description GHA_GITHUB_ORG = getenvOrDie("GHA_GITHUB_ORG", "Error: please set GHA_GITHUB_ORG to name of github organization for the course, e.g. UCSB-CS56-W14") # Authenticate to github.com and create PyGithub "Github" object username = raw_input("Github Username:"******"PyGithub") org = g.get_organization(GHA_GITHUB_ORG) # Populate the projectCategories dictionary (a dictionary where keys are category strings and values are lists of RepoListing objects) projectCategories = dict() for repo in org.get_repos(): repoName = repo.name repoUrl = repo.html_url
from github_acadwf import addPyGithubToPath from github_acadwf import addStudentsFromFileToTeams from github_acadwf import getAllStudentsTeam from github_acadwf import createTeam from github_acadwf import getenvOrDie from github_acadwf import getCSVFromURL addPyGithubToPath() from github import Github from github import GithubException import os import sys GHA_GITHUB_ORG = getenvOrDie("GHA_GITHUB_ORG", "Error: please set GHA_GITHUB_ORG to name of github organization for the course, e.g. UCSB-CS56-W14") GHA_STUDENT_LIST_URL = getenvOrDie('GHA_STUDENT_LIST_URL', "Error: please set GHA_STUDENT_LIST_URL to url of Google Spreadsheet with the github ids") GHA_WORKDIR = getenvOrDie('GHA_WORKDIR', "Error: please set GHA_WORKDIR to a writeable scratch directory") # Now try to get the Google Spreadsheet Data csvFile = getCSVFromURL(GHA_STUDENT_LIST_URL,GHA_WORKDIR,"students.csv", " check value of GHA_WORKDIR")
import sys import argparse from github_acadwf import makeUserDict from github_acadwf import getUserList sys.path.append("./PyGithub"); from github import Github from github import GithubException GHA_GITHUB_ORG = getenvOrDie("GHA_GITHUB_ORG", "Error: please set GHA_GITHUB_ORG to name of github organization for the course, e.g. UCSB-CS56-W14") GHA_WORKDIR = getenvOrDie('GHA_WORKDIR', "Error: please set GHA_WORKDIR to a writeable scratch directory") GHA_STARTPOINT_DIR = getenvOrDie('GHA_STARTPOINT_DIR', "Error: please set GHA_STARTPOINT_DIR to a readable directory") # Now try to get the Google Spreadsheet Data parser = argparse.ArgumentParser(description='Update lab for pairs') parser.add_argument('lab',metavar='labxx',