Commit de5fc6e5 authored by Henrik Skov Midtiby's avatar Henrik Skov Midtiby

Updates .

parent 10dc142d
......@@ -44,6 +44,7 @@ def create_a_new_repository_in_group(repo_name, group_id):
def add_user_to_project(project_id, user_id):
"""
Add user with id "user_id" to the project with id "project_id".
Give developer access rights to the added user.
"""
return requests.post(
gitlab_url_api4('/projects/%d/members?user_id=%d&access_level=30' %
......@@ -144,6 +145,33 @@ def create_a_new_repository_in_group_example_two():
pprint.pprint(resp.json())
# Todos
# * Look up username to get the userid of the user (henrikmidtiby@gmail.com, # 646)
# * Look up class name to get the groupid of the class (SDU UAS Center, # 453)
# * Create a group for a new class
# * Load list of assignments / projects and create repositories for these
# within a specified class.
# * Load list of students and assignments, and add students to the specific
# assignments (within a class).
# * Load list of assignments, download / clone all repositories to this
# computer.
# List of assignments
assignment_name class
hw1-adam test2
hw1-birger test2
hw2-adam test2
hw2-birger test2
# List of students to add to a project
student_id assignment_name class
101 hw1-birger test2
105 hw1-adam test2
105 hw2-adam test2
# fetch_and_show_commits_example()
# create_a_new_repository_example()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment