Ejemplo n.º 1
0
	print("{user} {repo}".format(user=user, repo=repo))
	check_folders = check_contents(user, repo, "/courses/prog_base/tasks/hello_world") 
	if not check_folders:
		return 2;
	if not check_contents(user, repo, "/courses/prog_base/tasks/hello_world/hello.c"):
		return 3;
	if not ( check_contents(user, repo, "/courses/prog_base/tasks/hello_world/hello") or check_contents(user, repo, "/courses/prog_base/tasks/hello_world/hello.exe") ):
		return 4;
	return 0;
	
def check():
	students = get_students("/home/devincube/Documents/students.csv")
	for st in students:
		repo = st["repo"]
		if not repo: continue;
	
		status = check_hello_world(repo)
		
		print("{status} {repo}".format(repo=repo, status=status))

if __name__ == "__main__":
	
	user = '******'
	repo = 'repos1'
	path = "/courses/prog_base/tasks/hello_world"
	res = github.get_contents_request(user, repo, path)
	print(res)
	
	

Ejemplo n.º 2
0
        return 2
    if not check_contents(user, repo,
                          "/courses/prog_base/tasks/hello_world/hello.c"):
        return 3
    if not (check_contents(user, repo,
                           "/courses/prog_base/tasks/hello_world/hello")
            or check_contents(
                user, repo, "/courses/prog_base/tasks/hello_world/hello.exe")):
        return 4
    return 0


def check():
    students = get_students("/home/devincube/Documents/students.csv")
    for st in students:
        repo = st["repo"]
        if not repo: continue

        status = check_hello_world(repo)

        print("{status} {repo}".format(repo=repo, status=status))


if __name__ == "__main__":

    user = '******'
    repo = 'repos1'
    path = "/courses/prog_base/tasks/hello_world"
    res = github.get_contents_request(user, repo, path)
    print(res)