How can students update their GitHub Classroom assignment repository?

983 views Asked by At

I have an assignment that was already accepted by some of the students and I need to update it.

I updated the assignment template.

How can students now merge the updates into their repositories? (I need to have the students merge the changes to their repositories themselves).

I can't find instructions on how to do this anywhere. There are instructions on how to update the assignment configuration but that doesn't update the student repositories.

I have a student test account with which I tried to set the template assignment repository as a remote but it can't find it (maybe because it's private, but I can't make it public).

2

There are 2 answers

0
Qrt On

As of June 2024, the repository creation changed from “Create from Template” to Forks:

Students will be able to sync their assignment repository with the upstream starter code, allowing teachers to correct starter code mistakes or add additional content after the assignment has gone live to students.

Here is a description of how students can sync the assignement repo. Essentially, there is a Sync Fork dropdown on the main page of the forked repository that should be synced.

0
uniform64 On

I got the same problem recently. It seems that there's no offical method provided, and here's what I think could be a solution:

  1. Download classroom roster from Github Classroom. Identifier and corresponding Github username are included in the roster.
  2. Find all assignment-relevant repositories in the Github organization. You can use Github API api.github.com/orgs/ORG/repos to get all repositories in the organization and filter them by assignment_name-github_username and maybe created_at attribute if previous assignments with the same name exist.
  3. Merge/PR your update to all repos found in step 2 respectively. You can run a simple script locally to finish the step, since you have full permission for all the repos.